home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: passwd Chapter 2
UNIX Commands
Next: Reference: pcat
 

paste



paste

 [

options

] 

files

Merge corresponding lines of one or more files into vertical columns, separated by a tab. See also cut , join , newform , 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:

\n

Newline

\t

Tab

\

Backslash

\0

Empty String

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

-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


Previous: Reference: passwd UNIX in a Nutshell: System V Edition Next: Reference: pcat
Reference: passwd Book Index Reference: pcat

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System










??????????????@Mail.ru