COHERENT manpages
This page displays the COHERENT manpage for paste [Merge lines of files].
List of available manpages
Index
paste -- Command Merge lines of files paste [-s] [-d list] file ... paste merges corresponding lines from multiple input files. By default, paste uses the <tab> character to delineate texts from different files. paste writes the merged text to standard output; thus, paste can be used at the head of a shell pipeline. If paste reads EOF from any of the input files while other files still contain data, it substitutes blank lines as input from the file that has ended. Options paste recognizes the following command-line options: -d list Use the characters in list to separate the output fields. The characters in list are taken in sequence and used circularly, i.e., taken in order until the end of list is reached, then returning to the first character in list. By default, paste uses the <tab> character to delineate the output fields. The following character sequences have special meaning when encountered in list: \\ Output a single backslash character \t Output a <tab> character \n Output a <newline> character \0 Output a null string (i.e., no separator between output fields) -s Output successive lines from each input file across the page, with each input line separated from the next by a <tab> character. After all input lines from a given file have been concatenated, terminate the output line with a <newline> character and repeat the process on the next input file. Example The following two files will be used for subsequent examples. File1 contains: File1_Line1 File1_Line2 File1_Line3 File1_Line4 File2 contains: File2_Line1 File2_Line2 File2_Line3 File2_Line4 The command paste File1 File2 generates the following output: File1_Line1 File2_Line1 File1_Line2 File2_Line2 File1_Line3 File2_Line3 File1_Line4 File2_Line4 Adding the option -s yields the output: File1_Line1 File1_Line2 File1_Line3 File1_Line4 File2_Line1 File2_Line2 File2_Line3 File2_Line4 See Also awk, commands, cut, sed Notes paste is copyright © 1989 by The Regents of the University of California. All rights reserved.