paste (Unix)

[3] The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.

When it has completed its operation for the last file, paste will output a newline character and move on to the next line.

Though potentially useful, an option to have paste emit an alternate string for a missing field (such as "NA") is not standard.

A sequence of empty records at the bottom of a column of the output stream may or may not have been present in the input file corresponding to that column as explicit empty records, unless you know the input file supplied all rows explicitly (e.g. in the canonical case where all input files all do indeed have the same number of lines).

For the following examples, assume that names.txt is a plain-text file that contains the following information: and that numbers.txt is another plain-text file that contains the following information: The following example shows the invocation of paste with names.txt and numbers.txt as well as the resulting output: When invoked with the --serial option (-s on BSD or older systems), the output of paste is adjusted such that the information is presented in a horizontal fashion: Finally, the use of the --delimiters option (-d on BSD or older systems) is illustrated in the following example: As an example usage of both, the paste command can be used to concatenate multiple consecutive lines into a single row: