Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cat(1) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

ex(1)

more(1)

pr(1)

tail(1)

cat(1)

NAME

cat − concatenate and print

SYNTAX

cat [ −b ] [ −e ] [ −n ] [ −s ] [ −t ] [ −u ] [ −v ] file... 

DESCRIPTION

The cat command reads each file in sequence and displays it on the standard output.  For example:

cat file

The first command displays the file on the standard output, and

cat file1 file2 >file3

The second command concatenates the first two files and places the result on the third.

If no input file is given, or if the argument “−” is encountered, cat reads from the standard input file.  Output is buffered in 512-byte blocks unless the standard output is a terminal, in which case it is line buffered. 

OPTIONS

−bIgnores blank lines and precedes all other output with line numbers. 

−eDisplays a dollar sign ($) at the end of each output line. 

−nPrecedes all output lines (including blank lines) with line numbers. 

−sSqueezes adjacent empty lines so that the output is displayed single spaced. 

−tDisplays all non-printing characters including tabs in the output.  In addition to those representations used with the −v option, all tab characters are displayed as ^I. 

−uMakes the output completely unbuffered. 

−vDisplays non-printing characters (except tabs).  <CTRLx> (control character x) prints as ^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. 

cat a b >a
cat a b >b

These commands destroy the input files before reading them.

SEE ALSO

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

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