CAT(1) — Unix Programmer’s Manual
NAME
cat − catenate and print
SYNOPSIS
cat [ options ] file ...
DESCRIPTION
Cat reads each file in sequence and displays it on the standard 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 you do not specify an input file or if you use the argument ‘−’, cat reads from the standard input file. Output is buffered in the block size recommended by stat(2) unless the standard output is a terminal, when it is line buffered.
OPTIONS
−b When used with the −n option, omits the line numbers from blank lines.
−e When used with -v, displays a ‘$’ character at the end of each line.
−n Displays the output lines preceded by lines numbers, numbered sequentially from 1.
−s Crushes out multiple adjacent empty lines so that the output is displayed single spaced.
−t When used with -v, displays tab characters as ^I.
−u Makes the output completely unbuffered.
−v 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.
SEE ALSO
cp(1), ex(1), more(1), pr(1), tail(1)
BUGS
Beware that ‘cat a b >a’ and ‘cat a b >b’ destroy input files before reading them.
4th Berkeley Distribution — May 5, 1986