|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)cat.1 6.3 (Berkeley) 9/29/87
6: .\"
7: .TH CAT 1 "September 29, 1987"
8: .UC 4
9: .SH NAME
10: cat \- catenate and print
11: .SH SYNOPSIS
12: .B cat
13: [
14: .B \-benstuv
15: ]
16: file ...
17: .br
18: .SH DESCRIPTION
19: .I Cat
20: reads each
21: .I file
22: in sequence and displays it on the standard output. Thus
23: .PP
24: .ti+15n
25: cat file
26: .PP
27: displays the file on the standard output, and
28: .PP
29: .ti+15n
30: cat file1 file2 >file3
31: .PP
32: concatenates the first two files and places the result on the third.
33: .PP
34: If no input file is given, or if the argument `\-' is encountered,
35: .I cat
36: reads from the standard input file.
37: Output is buffered in the block size recommended by \fIstat\fP(2)
38: unless the standard output is a terminal,
39: when it is line buffered. The
40: .B \-u
41: option makes the output completely unbuffered.
42: .PP
43: The
44: .B \-n
45: option displays the output lines preceded by lines numbers, numbered
46: sequentially from 1. Specifying the
47: .B \-b
48: option with the
49: .B \-n
50: option omits the line numbers from blank lines.
51: .PP
52: The
53: .B \-s
54: option crushes out multiple adjacent empty lines so that the
55: output is displayed single spaced.
56: .PP
57: The
58: .B \-v
59: option displays non-printing characters so that they are visible.
60: Control characters print like ^X for control-x; the delete character
61: (octal 0177) prints as ^?.
62: Non-ascii characters (with the high bit set) are printed as M-
63: (for meta) followed by the character of the low 7 bits. A
64: .B \-e
65: option may be given with the
66: .B \-v
67: option, which displays a `$' character at the end of each line.
68: Specifying the
69: .B \-t
70: option with the
71: .B \-v
72: option displays tab characters as ^I.
73: .PP
74: .SH "SEE ALSO"
75: cp(1), ex(1), more(1), pr(1), tail(1)
76: .SH BUGS
77: Beware of `cat a b >a' and `cat a b >b', which destroy
78: the input files before reading them.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.