cat

NAME

cat - concatenate and print files

SYNOPSIS

cat [-bensStuv] [file ...]

DESCRIPTION

The cat(1) utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order. A single dash represents the standard input.

The options are as follows:

-b
Like -n but does not number blank lines.
-e
Like -v and displays a dollar sign ($) at the end of each line.
-n
Number the output lines beginning at 1.
-s
Do not display any error messages for unreadable or non-existant files.
-S
Remove blank lines adjacent to another empty line, causing a single blank line to be output.
-t
Like -v and also displays tab characters as ^I.
-u
The -u option ensures that the output is unbuffered.
-v
Displays non-printing characters so they are visible. Control characters print as ^X for control-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 defined by the lower seven bits.

Because of the shell language mechanism that is used to perform output redirection, the following command will cause the original data in file1 to be destroyed unless the shell is set for noclobber.

cat file1 file 2 > file1

DIAGNOSTICS

The cat(1) utility exits with 0 on success, and >0 if an error occurs.

SEE ALSO

head(1)

pr(1)

tail(1)