Difference between revisions of "Paste - Ubuntu Linux program"

(Created page with "The command paste - (which is similar to cat) - outputs the input files largely unchanged to the standard output, but does not simply hang them one after the other, but combin...")
(No difference)

Revision as of 17:21, 10 October 2019

The command paste - (which is similar to cat) - outputs the input files largely unchanged to the standard output, but does not simply hang them one after the other, but combines lines of input column by column.

There are two modes of operation: All lines of the input files with the same line number are combined to one line of the output and separated with one character each.
All lines of an output file are combined to a single line of output (again with a separator) before the next file is output.

The default separator is a tab.

Example for 1:

paste <(seq 1 5) <(seq 11 15) <(seq 21 25)
    1 11 21
    2 12 22
    3 13 23
    4 14 24
    5 15 25