2005-05-02 15:01:42 +02:00
|
|
|
.TH PASTE 1
|
|
|
|
.SH NAME
|
|
|
|
paste \- paste multiple files together
|
|
|
|
.SH SYNOPSIS
|
|
|
|
\fBpaste\fR [\fB\-s\fR]\fR [\fB\-d\fI list\fR] \fIfile...\fR
|
|
|
|
.br
|
|
|
|
.de FL
|
|
|
|
.TP
|
|
|
|
\\fB\\$1\\fR
|
|
|
|
\\$2
|
|
|
|
..
|
|
|
|
.de EX
|
|
|
|
.TP 20
|
|
|
|
\\fB\\$1\\fR
|
|
|
|
# \\$2
|
|
|
|
..
|
|
|
|
.SH OPTIONS
|
2012-03-31 23:44:29 +02:00
|
|
|
.TP 5
|
|
|
|
.B \-d
|
|
|
|
# Set delimiter used to separate columns to \fIlist\fR.
|
|
|
|
.TP 5
|
|
|
|
.B \-s
|
|
|
|
# Print files sequentially, file \fIk\fR on line \fIk\fR.
|
2005-05-02 15:01:42 +02:00
|
|
|
.SH EXAMPLES
|
2012-03-31 23:44:29 +02:00
|
|
|
.TP 20
|
|
|
|
.B paste file1 file2
|
|
|
|
# Print \fIfile1\fR in col 1, \fIfile2\fR in col 2
|
|
|
|
.TP 20
|
|
|
|
.B paste \-s f1 f2
|
|
|
|
# Print \fIf1\fR on line 1 and \fIf2\fR on line 2
|
|
|
|
.TP 20
|
|
|
|
.B paste -d : file1 file2
|
|
|
|
# Print the lines separated by a colon
|
2005-05-02 15:01:42 +02:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.PP
|
|
|
|
\fIPaste\fR concatenates corresponding lines of the given input files
|
|
|
|
and writes them to standard output. The lines of the different files
|
|
|
|
are separated by the delimiters given with the option \-s\fR. If
|
|
|
|
no list is given, a tab is substituted for every linefeed, except the last one.
|
|
|
|
If end-of-file is hit on an input file, subsequent lines are empty.
|
|
|
|
Suppose a set of \fIk\fR files each has one word per line.
|
|
|
|
Then the \fIpaste\fR output will have \fIk\fR columns,
|
|
|
|
with the contents of file \fIj\fR in column \fIj\fR.
|
|
|
|
If the \fB\-s\fR flag is given, then the first
|
|
|
|
file is on line 1, the second file on line 2, etc.
|
|
|
|
In effect, \fB\-s\fR turns the output sideways.
|
|
|
|
.PP
|
|
|
|
If a list of delimiters is given, they are used in turn. The C escape
|
|
|
|
sequences \\n, \\t, \\\\, and \\0 are used for linefeed, tab, backslash, and
|
|
|
|
the null string, respectively.
|