concatenate and display files
cat [ -u ] [ -s ] [ -v ]
[ -t ] [ -e ] [ file ... ]
cat reads each file in sequence and writes it on
the standard output. If no input file is given, or if a single dash
(-) is given, cat reads from the standard input. The
Suppresses warnings about nonexistent files.
Causes the output to be unbuffered.
Causes non-printing characters (with the exception of tabs,
newlines, and form feeds) to be displayed. Control characters are
displayed as ^X (<Ctrl>x), where X is
the key pressed with the <Ctrl> key (for example, <Ctrl>m is
displayed as ^M). The <Del> character (octal 0177) is
printed as ^?. Non-ASCII characters (with the high bit
set) are printed as M -x, where x is
the character specified by the seven low order bits.
Causes tabs to be printed as ^I
and form feeds as ^L. This option is ignored if the
-v option is not specified.
Causes a ``$'' character to be printed at the end of each line
(prior to the new-line). This option is ignored if the -v
option is not set.
cat returns the following values:
all input files were output successfully
an error occurred
The following example displays file on the standard
The following example concatenates file1 and
file2 and places the result in file3:
cat file1 file2 >file3
The following example concatenates file1 and appends it to
cat file1 >> file2
Command lines such as:
cat file1 file2 > file1
will cause the original data in file1 to be lost;
therefore, you must be careful when using special shell characters.
cat is conformant with:
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.
A version of cat
that can handle files greater than 2GB
is available in /u95/bin. See
for more information.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005