BSD 4_4_Lite2 development
[unix-history] / usr / share / man / cat1 / cat.0
CAT(1) BSD Reference Manual CAT(1)
N\bNA\bAM\bME\bE
c\bca\bat\bt - concatenate and print files
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
c\bca\bat\bt [-\b-b\bbe\ben\bns\bst\btu\buv\bv] [-\b-] [_\bf_\bi_\bl_\be _\b._\b._\b.]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The c\bca\bat\bt utility reads files sequentially, writing them to the standard
output. The _\bf_\bi_\bl_\be operands are processed in command line order. A single
dash represents the standard input.
The options are as follows:
-\b-b\bb Implies the -\b-n\bn option but doesn't number blank lines.
-\b-e\be Implies the -\b-v\bv option, and displays a dollar sign (`$') at the
end of each line as well.
-\b-n\bn Number the output lines, starting at 1.
-\b-s\bs Squeeze multiple adjacent empty lines, causing the output to be
single spaced.
-\b-t\bt Implies the -\b-v\bv option, and displays tab characters as `^I' as
well.
-\b-u\bu The -\b-u\bu option guarantees that the output is unbuffered.
-\b-v\bv Displays non-printing characters so they are visible. Control
characters print as `^X' for control-X; the delete character (oc-
tal 0177) prints as `^?' Non-ascii characters (with the high bit
set) are printed as `M-' (for meta) followed by the character for
the low 7 bits.
The c\bca\bat\bt utility exits 0 on success, and >0 if an error occurs.
B\bBU\bUG\bGS\bS
Because of the shell language mechanism used to perform output redirec-
tion, the command ``cat file1 file 2 > file1'' will cause the original
data in file1 to be destroyed!
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
head(1), more(1), pr(1), tail(1), vis(1)
Rob Pike, "UNIX Style, or cat -v Considered Harmful", _\bU_\bS_\bE_\bN_\bI_\bX _\bS_\bu_\bm_\bm_\be_\br
_\bC_\bo_\bn_\bf_\be_\br_\be_\bn_\bc_\be _\bP_\br_\bo_\bc_\be_\be_\bd_\bi_\bn_\bg_\bs, 1983.
H\bHI\bIS\bST\bTO\bOR\bRY\bY
A c\bca\bat\bt command appeared in Version 6 AT&T UNIX.
3rd Berkeley Distribution May 2, 1995 1