|
|
1.1 root 1: .\" Copyright (c) 1989, 1990 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\"
5: .\" This code is derived from software contributed to Berkeley by
6: .\" Adam S. Moskowitz.
7: .\"
8: .\" Redistribution and use in source and binary forms are permitted provided
9: .\" that: (1) source distributions retain this entire copyright notice and
10: .\" comment, and (2) distributions including binaries display the following
11: .\" acknowledgement: ``This product includes software developed by the
12: .\" University of California, Berkeley and its contributors'' in the
13: .\" documentation or other materials provided with the distribution and in
14: .\" all advertising materials mentioning features or use of this software.
15: .\" Neither the name of the University nor the names of its contributors may
16: .\" be used to endorse or promote products derived from this software without
17: .\" specific prior written permission.
18: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21: .\"
22: .\" @(#)paste.1 5.3 (Berkeley) 7/24/90
23: .\"
24: .Dd July 24, 1990
25: .Dt PASTE 1
26: .Os BSD 4.4
27: .Sh NAME
28: .Nm paste
29: .Nd merge corresponding or subsequent lines of files
30: .Sh SYNOPSIS
31: .Nm paste
32: .Op Fl s
33: .Op Fl d Ar list
34: .Ar file ...
35: .Sh DESCRIPTION
36: The
37: .Nm paste
38: utility concatenates the corresponding lines of the given input files,
39: replacing all but the last file's newline characters with a single tab
40: character, and writes the resulting lines to standard output.
41: If end-of-file is reached on an input file while other input files
42: still contain data, the file is treated as if it were an endless source
43: of empty lines.
44: .Pp
45: The options are as follows:
46: .Tw Fl
47: .Tp Cx Fl d
48: .Ar list
49: .Cx
50: Use one or more of the provided characters to replace the newline
51: characters instead of the default tab.
52: The characters in
53: .Ar list
54: are used circularly, i.e., when
55: .Ar list
56: is exhausted the first character from
57: .Ar list
58: is reused.
59: This continues until a line from the last input file (in default operation)
60: or the last line in each file (using the -s option) is displayed, at which
61: time
62: .Nm paste
63: begins selecting characters from the beginning of
64: .Ar list
65: again.
66: .Pp
67: The following special characters can also be used in list:
68: .Tw Ds
69: .Tp Li \en
70: newline character
71: .br
72: .Tp Li \et
73: tab character
74: .br
75: .Tp Li \e\e
76: backslash character
77: .br
78: .Tp Li \e0
79: Empty string (not a null character).
80: .Pp
81: Any other character preceded by a backslash is equivalent to the
82: character itself.
83: .Tp
84: .Tp Fl s
85: Concatenate all of the lines of each separate input file in command line
86: order.
87: The newline character of every line except the last line in each input
88: file is replaced with the tab character, unless otherwise specified by
89: the -d option.
90: .Tp
91: .Pp
92: If ``-'' is specified for one or more of the input files, the standard
93: input is used; standard input is read one line at a time, circularly,
94: for each instance of ``-''.
95: .Pp
96: The
97: .Nm paste
98: utility exits 0 on success, and >0 if an error occurs.
99: .Sh SEE ALSO
100: .Xr cut 1
101: .Sh STANDARDS
102: The
103: .Nm paste
104: function is expected to be POSIX 1003.2 compatible.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.