Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cat(1V) — SunOS 4.0.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

ex(1)

more(1)

pg(1V)

pr(1V)

tail(1)

CAT(1V)  —  USER COMMANDS

NAME

cat − concatenate and display

SYNOPSIS

cat [ − ] [ −benstuv ] [ filename... ]

SYSTEM V SYNOPSIS

cat [ − ] [ −estuv ] [ filename... ]

DESCRIPTION

cat reads each filename in sequence and displays it on the standard output.  Thus:

example% cat goodies

displays the contents of goodies on the standard output, and

example% cat filename1 filename2 > filename3

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 CTRL-D. 

OPTIONS

−b Number the lines, as −n, but omit the line numbers from blank lines. 

−e Display non-printing characters, as −v, and in addition display a $ character at the end of each line. 

−n Precede each line output with its line number. 

−s Substitute a single blank line for multiple adjacent blank lines. 

−t Display non-printing characters, as −v, and in addition display TAB characters as ^I (CTRL-I). 

−u Unbuffered.  If −u is not used, output is buffered in blocks, or line-buffered if standard output is a terminal. 

−v Display non-printing characters (with the exception of TAB and NEWLINE characters) so that they are visible.  Control characters print like ^X for CTRL-X; the DEL character (octal 0177) print 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. 

SYSTEM V OPTIONS

−e If the −v option is specified, display a $ character at the end of each line. 

−s Suppress messages about files which cannot be opened. 

−t If the −v option is specified, displays TAB characters as ^I (CTRL-I) and FORMFEED characters as ^L (CTRL-I). 

−v Display non-printing character (with the exception of TAB, NEWLINE, and FORMFEED characters) so that they are visible. 

SEE ALSO

cp(1), ex(1), more(1), pg(1V), pr(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 4.0  —  Last change: 9 September 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026