I have the following two files ( I padded the lines with dots so every line in a file is the same width and made file1 all caps to make it more clear).
contents of file1:
ETIAM......
SED........
MAECENAS...
DONEC......
SUSPENDISSE
contents of file2
Lorem....
Proin....
Nunc.....
Quisque..
Aenean...
Nam......
Vivamus..
Curabitur
Nullam...
Notice that file2 is longer than file1.
When I run this command:
paste file1 file2
I get this output
ETIAM...... Lorem....
SED........ Proin....
MAECENAS... Nunc.....
DONEC...... Quisque..
SUSPENDISSE Aenean...
Nam......
Vivamus..
Curabitur
Nullam...
What can I do for the output to be as follows ?
ETIAM...... Lorem....
SED........ Proin....
MAECENAS... Nunc.....
DONEC...... Quisque..
SUSPENDISSE Aenean...
Nam......
Vivamus..
Curabitur
Nullam...
I tried
paste file1 file2 | column -t
but it does this:
ETIAM...... Lorem....
SED........ Proin....
MAECENAS... Nunc.....
DONEC...... Quisque..
SUSPENDISSE Aenean...
Nam......
Vivamus..
Curabitur
Nullam...
non as ugly as the original output but wrong column-wise anyway.
pasteis using tabs in front of the lines from second file. You may have to use a postprocessor to align the columns appropriately.paste file1 file2 | column -tn?paste file[12] | column -s $'\t' -t -o ' 'or have I missed something?