72 lines
2.0 KiB
HTML
72 lines
2.0 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>paste(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>paste(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
paste - paste multiple files together
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>paste</STRONG> [<STRONG>-s</STRONG>] [<STRONG>-d</STRONG> <EM>list</EM>] <EM>file</EM>...
|
|
|
|
|
|
</PRE>
|
|
<H2>OPTIONS</H2><PRE>
|
|
|
|
<STRONG>-d</STRONG> Set delimiter used to separate columns to <EM>list</EM>.
|
|
|
|
<STRONG>-s</STRONG> Print files sequentially, file <EM>k</EM> on line <EM>k</EM>.
|
|
|
|
|
|
</PRE>
|
|
<H2>EXAMPLES</H2><PRE>
|
|
|
|
<STRONG>paste</STRONG> <STRONG>file1</STRONG> <STRONG>file2</STRONG> # Print <EM>file1</EM> in col 1, <EM>file2</EM> in col 2
|
|
|
|
<STRONG>paste</STRONG> <STRONG>-s</STRONG> <STRONG>f1</STRONG> <STRONG>f2</STRONG> # Print <EM>f1</EM> on line 1 and <EM>f2</EM> on line 2
|
|
|
|
<STRONG>paste</STRONG> <STRONG>-d</STRONG> <STRONG>:</STRONG> <STRONG>file1</STRONG> <STRONG>file2</STRONG>
|
|
# Print the lines separated by a colon
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
|
|
<EM>Paste</EM> 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. 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 <EM>k</EM> files each has one word per line. Then the <EM>paste</EM> output will
|
|
have <EM>k</EM> columns, with the contents of file <EM>j</EM> in column <EM>j</EM>. If the <STRONG>-s</STRONG> flag
|
|
is given, then the first file is on line 1, the second file on line 2,
|
|
etc. In effect, <STRONG>-s</STRONG> turns the output sideways.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|