CAT(1) COMMAND REFERENCE CAT(1) NAME cat - catenate and print SYNOPSIS cat [ -b ] [ -e ] [ -n ] [ -s ] [ -t ] [ -u ] [ -v ] [ filename ... ] DESCRIPTION Cat reads each filename 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 no input file is given, or if the dash argument (-) is encountered, cat reads from the standard input. Output is buffered in 1024-byte blocks unless the standard output is a terminal, in which case it is line buffered. OPTIONS -b Displays the non-blank output lines preceded by line numbers, sequentially numbered from one. -e Similar to -v, with the exception that it displays a $ character at the end of each line. -n Displays the output lines preceded by line numbers, sequentially numbered from one. -s Removes multiple empty lines, leaving only one blank line. Note that a line which contains only blanks and tabs is not an empty line. -t Similar to -v, with the exception that it displays tab characters as ^I. -u Causes the output to be completely unbuffered. -v Displays non-printing characters so that they are visible. Control characters print like ^X for <CTRL-X> (except for tabs which continue to be expanded); 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. Printed 4/6/89 1
CAT(1) COMMAND REFERENCE CAT(1) EXAMPLES The following example concatenates the files tmp.1, tmp.2 and tmp.3 onto standard output. cat tmp.1 tmp.2 tmp.3 DIAGNOSTICS cat: Output is going to be written on input file file Cat displays this message if you try to redirect its output to a file which was one of the input files -- in other words, cat won't overwrite one of its input files. (See note below.) RETURN VALUE [NO_ERRS] Command completed without error. [NP_WARN] An error warranting a warning message occurred. Execution continues. [P_WARN] A system error occurred. Execution continues. See intro(2) for more information on system errors. CAVEATS Sh(1sh) redirection such as cat a b >a and cat a b >b, may destroy the input files before reading them. SEE ALSO cp(1), ex(1), more(1), pr(1), sh(1sh), and tail(1). Printed 4/6/89 2
%%index%% na:216,76; sy:292,356; de:648,722; op:1370,1261; ex:2919,247; di:3166,574; rv:3740,458; ca:4198,343; se:4541,207; %%index%%000000000147