I need to extract the first column from an arbitrary number of files and print the columns with empty lines for the missing entries. Having trouble with the blank lines part. Like so:
File1:
Alfa Something More stuff
Charlie Something More stuff
Delta Something More stuff
Echo Something More stuff
Foxtrot Something More stuff
File2:
Alfa Something More stuff
Bravo Something More stuff
Echo Something More stuff
Foxtrot Something More stuff
File3:
Alfa Something More stuff
Bravo Something More stuff
Charlie Something More stuff
Delta Something More stuff
Echo Something More stuff
Output:
FileName1 FileName2 FileName3
========= ========= =========
Alfa Alfa Alfa
Bravo Bravo
Charlie Charlie
Delta Delta
Echo Echo Echo
Foxtrot Foxtrot
Here’s one way to do it, other than some minor formatting issues: