CAT(1V) — USER COMMANDS
NAME
cat − concatenate and display
SYNOPSIS
cat [ −u ] [ −n ] [ −b ] [ −s ] [ −v ] [ −e ] [ −t ] [ − ] [ filename ... ]
SYSTEM V SYNOPSIS
cat [ −u ] [ −s ] [ −v ] [ −e ] [ −t ] [ − ] [ filename ... ]
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. If the standard input is a terminal, input is terminated by an EOF signal, usually ^D.
OPTIONS
−uUnbuffered. If −u is not used, output is buffered in 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 (with the exception of tabs and newlines) so that they are visible. Control characters print like ^X for Control-X; the DEL character (octal 0177) prints as ^?. Non-ASCII characters (with the high bit set) are displayed as M−x where M− stands for “meta” and x is the character specified by the seven low order 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.
SYSTEM V OPTIONS
−ssuppresses messages about files which can’t be opened.
−vdisplays non-printing character (with the exception of tabs, newlines, and formfeeds) so that they are visible.
−eif the −v option is specified, displays a $ character at the end of each line.
−tif the −v option is specified, displays tab characters as ^I and formfeeds as ^L.
SEE ALSO
cp(1), ex(1), more(1), pr(1V), pg(1V), tail(1)
BUGS
Beware of ‘cat a b >a’ and ‘cat a b >b’, which destroy the input files before reading them.
Sun Release 3.2 — Last change: 24 April 1986