paste - merge same lines of several files or subsequent lines of one file
Synopsis
Description
Environment Variables
See Also
paste file1 file2 . . .
paste -dlist file1 file2 . . .
paste -s [-dlist] file1 file2 . . .
The paste command, as shown in the first two synopsis forms, will combine each set of corresponding lines of the given files to one single line, separated by delimiters, a tabulator (\t) character by default. If a file contains fewer lines than others, nothing is printed between the delimiters.In the third synopsis form, paste serially combines all lines of each file to one single line, separated by delimiters. One line per file results.
If a file is '-', standard input is read.
The paste command accepts the following options:
-d list Sets the delimiter characters. Each single character in list is used in the given order to separate fields (former lines of input). If list is exhausted, or a new set of corresponding lines begins, or (with the -s option) a new file is printed, the sequence is repeated starting at the first character. The following character sequences in list are special:
\n Newline character. \t Tabulator character. \\ Backslash character. \0 No delimiter at all.
-s Selects the third synopsis form (serial paste).
LANG, LC_ALL See locale(7). LC_CTYPE Determines the mapping of bytes to characters for the argument of the -d option.
cut(1), locale(7)
Heirloom Toolchest | PASTE (1) | 4/17/03 |