cat(1)

cat(1)

International Code Set Support

Single- and multi-byte character code sets are supported.

RETURN VALUE

Exit values are:

0Successful completion.

>0 Error condition occurred.

EXAMPLES

To create a zero-length ®le, use any of the following:

cat /dev/null > ®le cp /dev/null ®le touch ®le

The following prints ÃI for all the occurrences of tab character in ®le1

cat -t ®le1

To suppress error messages about ®les that do not exist, use:

cat -s®le1 ®le2 ®le3 > ®le

If ®le2 does not exist, the above command concatenates ®le1 and ®le3 without reporting the error on ®le2. The result is the same if -soption is not used, except that cat displays the error message.

To view non-printable characters in ®le2, use:

cat -v ®le2

WARNINGS

Command formats such as

cat ®le1 ®le2 > ®le1

overwrites the data in ®le1 before the concatenation begins, thus destroying the ®le. 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

c

HP-UX Release 11i: December 2000

− 2 −

Section 161