CAT(1) — USER COMMANDS
NAME
cat − concatenate and display
SYNOPSIS
cat [ −u ] [ −n ] [ −b ] [ −s ] [ −v ] [ −e ] [ −t ] [ − ] [ file ... ]
DESCRIPTION
Cat reads each file in sequence and displays it on the standard output. Thus
% cat goodies
displays the contents of goodies on the standard output, and
% cat file1 file2 >file3
concatenates the first two files and places the result on the third.
If no filename argument is given, or if the argument ‘−’ is given, cat reads from the standard input file. If the standard input is a terminal, input is terminated by a ^D.
OPTIONS
−umakes the output completely unbuffered. If −u is not used, output is buffered in 1024-byte blocks, or line-buffered if standard output is a terminal.
−nprecedes each line output with its line number.
−bnumbers the lines, as −n, but omits the line numbers from blank lines.
−ssubstitutes a single blank line for multiple adjacent blank lines.
−vdisplays 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 displayed as M- (for meta) followed by the character of the low 7 bits.
−edisplays non-printing characters, as −v, and in addition displays a ‘$’ character at the end of each line.
−tdisplays non-printing characters, as −v, and in addition displays tab characters as ‘^I’.
SEE ALSO
cp(1), ex(1), more(1), pr(1), tail(1)
BUGS
Beware of ‘cat a b >a’ and ‘cat a b >b’, which destroy the input files before reading them.
Sun Release 2.0 — Last change: 2 June 1983