Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cat.bsd(1) — Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

ex(1)

more(1)

pr(1)

tail(1)

CAT(1)

NAME

cat − catenate and print

USAGE

cat [ −u ] [−n [b] ] [ −s ] [−v[t] [−e] 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 fail to specify an input file, or if you use a dash (−) in place of a filename, cat reads from the standard input file.  Output is buffered in 1024-byte blocks unless the standard output is a terminal, in which case it is line-buffered. 

OPTIONS

−u Make output completely unbuffered. 

−n Display output lines preceded by lines numbers, numbered sequentially from 1.  When a b is also specified, omit line numbers from blank lines. 

−s Crush out multiple adjacent empty lines so that the output appears single-spaced. 

−v[t] Make non-printing characters visible.  Control characters print like ^Z for CONTROL-Z; 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 −e option may be given with the −v option, which displays a dollar sign ($) character at the end of each line.  With the t keyletter specified, display tab characters as ^I. 

−e Display a dollar sign ($) character at the end of each line. 

CAUTIONS

Beware of “cat a b >a” and “cat a b >b”, which destroy the input files before reading them. 

RELATED INFORMATION

cp(1), ex(1), more(1), pr(1), tail(1). 

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