O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

paste

Synopsis

paste [options] files

Merges corresponding lines of one or more files into vertical columns, separated by a tab. See also cut , join , and pr .

Options

-

Replace a filename with the standard input.

-d' char '

Separate columns with char instead of a tab. char can be any regular character or the following escape sequences:

You can separate columns with different characters by supplying more than one char:

\n

Newline

\t

Tab

\

Backslash

\0

Empty string

-s

Merge subsequent lines from one file.

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required