------------------------------------------------------------------------ paste ------------------------------------------------------------------------ summary: paste allows you to put two files "side by side". In contrast cat lets you put one file below another. As with cat the two files need NOT be of equal length. paste options file1 file2 .. options: all are optional -d --delimiter (only one character; but see below for "feature") [tab] -s --serial $ seq 1 3 > a $ seq 4 1 6 > b $ paste a b 1 4 #default delimiter is tab 2 5 3 6 $ paste -s a b 1 2 3 6 5 4 $ cat c a b c d $ paste -d "," a c 1,a 2,b 3,c ,d #paste can also be applied to single file #useful to convert columns to rows $ paste -s c a b c d $ paste -d, -s c a,b,c,d $ ls *.txt | paste -s -d " " - #check this out $ ls *.txt | xargs #comparable to this $ paste - - < c #joins two lines at a time a b # since - is standard ouput c d #can also join three (- - -) at a time also $ cat file1 | paste -d, file1 - #input file can be a pipe $ paste -d '\n' a b #will intersperse merge file1 and file2 1 6 2 5 3 4 $ paste -s -d ";," a b #feature! Try longer columns and more delimiters 1,2;3 4,5;6 RESOURCES: http://www.theunixschool.com/2012/07/10-examples-of-paste-command-usage-in.html