paste

Merge lines of given input files, and write the resulting lines to standard output (POSIX)

Syntax:

paste [-s] [-d list] file

Runs on:

Neutrino

Options:

-d list
Specifies that each character in the list is an element specifying a delimiter character. Unless a backslash character appears in list, each character in list is an element specifying a delimiter character. If a backslash character appears in list, the backslash character and one or more characters following it are an element specifying a special delimiter character, described below. These elements specify one or more delimiters to use, instead of the default tab, to replace the newline of the input lines. If the -s option is also specified:

If the -s option isn't specified:

When a backslash character appears in list, the backslash character and the other characters that follow it are used to represent these delimiter characters:


Note:

When the escape sequences of the list argument are used in a shell script, you must use single quotation marks; otherwise, the shell interprets the backslash character as a special character.

The input files must be text files.


-s
Concatenates all lines of each separate input file in command line order. Except for the last line in each input file, the <newline> of every line is replaced with <tab>, unless otherwise specified by the -d option.
file
The pathname of an input file. Specifying “-” for one or more of the files uses the standard input, which is input read one line at a time for each instance of “-”.

Description:

For every file you name, the paste utility pastes columns or fields from each line, concatenates them, and writes them to the standard output.

By default, paste assumes the field delimiter character to be tab. You can use the -d option to specify another delimiter.

Examples:

The following are examples of the list argument:

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

cut, grep, pr