BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / cat.0
CAT(1) UNIX Programmer's Manual CAT(1)
N\bNA\bAM\bME\bE
cat - catenate and print
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
c\bca\bat\bt [ -\b-b\bbe\ben\bns\bst\btu\buv\bv ] file ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bC_\ba_\bt reads each _\bf_\bi_\bl_\be in sequence and displays it on the stan-
dard output. Thus
cat file
displays the file on the standard output, and
cat file1 file2 >file3
concatenates the first two files and places the result on
the third.
If no input file is given, or if the argument `-' is encoun-
tered, _\bc_\ba_\bt reads from the standard input file. Output is
buffered in the block size recommended by _\bs_\bt_\ba_\bt(2) unless the
standard output is a terminal, when it is line buffered.
The -\b-u\bu option makes the output completely unbuffered.
The -\b-n\bn option displays the output lines preceded by lines
numbers, numbered sequentially from 1. Specifying the -\b-b\bb
option with the -\b-n\bn option omits the line numbers from blank
lines.
The -\b-s\bs option crushes out multiple adjacent empty lines so
that the output is displayed single spaced.
The -\b-v\bv option displays non-printing characters so that they
are visible. Control characters print like ^X for control-
x; the delete character (octal 0177) prints as ^?. Non-
ascii characters (with the high bit set) are printed as M-
(for meta) followed by the character of the low 7 bits. A
-\b-e\be option may be given with the -\b-v\bv option, which displays a
`$' character at the end of each line. Specifying the -\b-t\bt
option with the -\b-v\bv option displays tab characters as ^I.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
cp(1), ex(1), more(1), pr(1), tail(1)
B\bBU\bUG\bGS\bS
Beware of `cat a b >a' and `cat a b >b', which destroy the
input files before reading them.
Printed 7/9/88 September 29, 1987 1