paste: Join multiple files into one

paste command can be used to join multiple files and display on the standard output or redirect it to a new file.

For e.g. let us take the following two example files



These two files can be joined as follows

The files are joined line by line and the default delimiter between the lines is a TAB space. This can be changed using the option "-d".

The output can be sent to anothe file using output redirection.

Instead of joining the files line by line it can be made to join seuentially i.e. one file after another using the option "-s"

The number of input files can be more than too also, the same rules apply to all of them .

Follow by Email