'\"macro stdmacro
.if n .pH g1.cat @(#)cat	40.4 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} cat 1 "Essential Utilities" "\&"
.if \nX=1 .ds x} cat 1 "Essential Utilities"
.if \nX=2 .ds x} cat 1 "" "\&"
.if \nX=3 .ds x} cat "" "" "\&"
.TH \*(x}
.SH NAME
\f4cat\f1 \- concatenate and print files
.SH SYNOPSIS
\f4cat\f1
\f1[\f4\-u\f1]
\f1[\f4\-s\f1]
\f1[\f4\-v\f1
\f1[\f4\-t\f1]
\f1[\f4\-e\f1]]
.IR file .\|.\|.
.SH DESCRIPTION
\f4cat\fP
reads each
.I file\^
in sequence
and writes it on the standard output.
Thus:
.PP
.RS
\f4cat file\f1
.RE
.PP
prints
\f4file\f1
on your terminal, and:
.PP
.RS
\f4cat file1 file2 >file3\f1
.RE
.PP
concatenates
\f4file1\f1
and
\f4file2\f1,
and writes the results in
\f4file3\f1.
.PP
If no input file is given,
or if the argument
\f4\-\f1
is encountered,
\f4cat\fP
reads from the standard
input file.
.PP
The following options apply to \f4cat\fP:
.TP
\f4\-u\f1
The output is not buffered.
(The default is buffered output.)
.TP
\f4\-s\f1
\f4cat\fP is silent about non-existent files.
.TP
\f4\-v\f1
Causes non-printing characters
(with the exception of tabs, new-lines
and form-feeds)
to be printed visibly.
\s-1ASCII\s0 control characters (octal 000 \- 037) are printed as
\f4^\f2n,\f1
where
.I n
is the corresponding \s-1ASCII\s0 character in the range octal 100 \- 137
(@, A, B, C, .\ .\ ., X, Y, Z, [, \e, ], ^, and _);
the DEL character (octal 0177) is printed
\f4^?\f1.
Other non-printable characters are printed
as
\f4M-\f2x,\f1
where
.I x
is the \s-1ASCII\s0 character specified by the low-order seven bits.
.PP
When used with the
\f4\-v\f1
option,
the following options may be used:
.TP
\f4\-t\f1
Causes tabs to be printed as
\f4^I\f1's
and formfeeds to be printed as
\f4^L\f1's.
.TP
\f4\-e\f1
Causes a
\f4$\f1
character to be printed at the end of each line
(prior to the new-line).
.PP
The
\f4\-t\f1
and
\f4\-e\f1
options are ignored if the
\f4\-v\f1
option is not specified.
.SH SEE ALSO
\f4cp\fP(1), \f4pg\fP(1), \f4pr\fP(1).
.SH NOTES
Redirecting the output of
\f4cat\f1
onto one of the files being read will cause the loss of the data originally in the file being read.
For example,
.PP
.RS
\f4cat file1 file2 >file1\f1
.RE
.PP
causes the original data in \f4file1\fP to be lost.
.\"	@(#)cat.1	6.3 of 9/2/83
.Ee
