Name

paste

Synopsis

paste [options] files

Merge corresponding lines of one or more files into tab-separated vertical columns and write to standard output. Use - to read from standard input, instead of specifying a file. See also cut, join, and pr.

Options

-dchar, --delimiters=char

Separate columns with char instead of a tab. You can separate columns with different characters by supplying more than one char.

--help

Print a help message and then exit.

-s, --serial

Merge lines from one file at a time.

--version

Print version information and then exit.

Examples

Create a three-column file from files x, y, and z:

paste x y z > file

List users in two columns:

who | paste - -

Merge each pair of lines into one line:

paste -s -d"\t\n" list

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.