Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
c
cat(1) cat(1)
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
Exit values are:
0 Successful completion.
>0 Error condition occurred.
EXAMPLES
To create a zero-length file, use any of the following:
cat /dev/null > file
cp /dev/null le
touch file
The following prints ˆI for all the occurrences of tab character in file1
cat -t file1
To suppress error messages about files that do not exist, use:
cat -s file1 file2 file3 >
file
If file2 does not exist, the above command concatenates file1 and file3 without reporting the error on file2.
The result is the same if
-s option is not used, except that cat displays the error message.
To view non-printable characters in file2, use:
cat -v file2
WARNINGS
Command formats such as
cat file1 file2 > file1
overwrites the data in file1 before the concatenation begins, thus destroying the file. Therefore, be careful
when using shell special characters.
SEE ALSO
cp(1), more(1), pg(1), pr(1), rmnl(1), ssp(1).
STANDARDS CONFORMANCE
cat: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
HP-UX Release 11i: December 2000 2 Section 161
___
___