1 | .TH PASTE 1
|
---|
2 | .SH NAME
|
---|
3 | paste \- paste multiple files together
|
---|
4 | .SH SYNOPSIS
|
---|
5 | \fBpaste\fR [\fB\-s\fR]\fR [\fB\-d\fI list\fR] \fIfile...\fR
|
---|
6 | .br
|
---|
7 | .de FL
|
---|
8 | .TP
|
---|
9 | \\fB\\$1\\fR
|
---|
10 | \\$2
|
---|
11 | ..
|
---|
12 | .de EX
|
---|
13 | .TP 20
|
---|
14 | \\fB\\$1\\fR
|
---|
15 | # \\$2
|
---|
16 | ..
|
---|
17 | .SH OPTIONS
|
---|
18 | .FL "\-d" "Set delimiter used to separate columns to \fIlist\fR.
|
---|
19 | .FL "\-s" "Print files sequentially, file \fIk\fR on line \fIk\fR.
|
---|
20 | .SH EXAMPLES
|
---|
21 | .EX "paste file1 file2" "Print \fIfile1\fR in col 1, \fIfile2\fR in col 2"
|
---|
22 | .EX "paste \-s f1 f2" "Print \fIf1\fR on line 1 and \fIf2\fR on line 2"
|
---|
23 | .EX "paste -d : file1 file2" "Print the lines separated by a colon"
|
---|
24 | .SH DESCRIPTION
|
---|
25 | .PP
|
---|
26 | \fIPaste\fR concatenates corresponding lines of the given input files
|
---|
27 | and writes them to standard output. The lines of the different files
|
---|
28 | are separated by the delimiters given with the option \-s\fR. If
|
---|
29 | no list is given, a tab is substituted for every linefeed, except the last one.
|
---|
30 | If end-of-file is hit on an input file, subsequent lines are empty.
|
---|
31 | Suppose a set of \fIk\fR files each has one word per line.
|
---|
32 | Then the \fIpaste\fR output will have \fIk\fR columns,
|
---|
33 | with the contents of file \fIj\fR in column \fIj\fR.
|
---|
34 | If the \fB\-s\fR flag is given, then the first
|
---|
35 | file is on line 1, the second file on line 2, etc.
|
---|
36 | In effect, \fB\-s\fR turns the output sideways.
|
---|
37 | .PP
|
---|
38 | If a list of delimiters is given, they are used in turn. The C escape
|
---|
39 | sequences \\n, \\t, \\\\, and \\0 are used for linefeed, tab, backslash, and
|
---|
40 | the null string, respectively.
|
---|