cat(1) DG/UX R4.11MU05 cat(1)
NAME
cat - concatenate and type files to standard output
SYNOPSIS
cat [ -u ] [ -s ] [ -v [ -t ] [ -e ] ] [ -|file ] ...
where:
file Name of file being typed
DESCRIPTION
Cat reads each file (from left to right) and writes it on the
standard output. If no input file is given, or if the argument is -,
cat reads from standard input.
When the standard input is the keyboard and the standard output is
the screen, cat prints back each line as you enter it (the new-line
character and all other special characters cannot be escaped). cat
does not interpret characters.
Using cat >file1 is a good way to create short files quickly. Type
^d (Ctrl-D) to end input to the file.
Options are:
-u Unbuffered output. The output is buffered unless you give this
option.
-s Be silent about non-existent files; no error message is given.
-v Visible printing of nonprinting characters, except tabs
(Ctrl-I), new lines (Ctrl-J), and form feeds (Ctrl-L).
Control characters are printed ^X (representing Ctrl-X); the
DEL character (octal 0177) is printed ^?. 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.
-t Print each tab as ^I, but only if the -v option is also
present. Otherwise, it is ignored.
-e Print a $ character at the end of each line (prior to the
newline), but only if the -v option is also present.
Otherwise, it is ignored.
International Features
cat can read and write files containing characters from supplementary
code sets.
NOTE: When invoked with the -v option, cat considers all characters
from supplementary code sets to be printable.
EXAMPLES
cat file
prints the file on the screen.
cat file1 file2 > file3
concatenates the first two files and places the result on the third.
$ cat file1
The
quick
brown
fox
$ cat file2
jumped
over
the
lazy
dog.
$ cat file1 file2 > file3
$ cat file3
The
quick
brown
fox
jumped
over
the
lazy
dog.
The above example shows the concatenation of two different files into
one file.
SEE ALSO
cp(1), head(1), more(1), pg(1), pr(1), tail(1).
NOTE
Sh(1) creates and/or opens the files for the output of the cat
command before reading the files for its input. Therefore, command
formats such as
cat file1 file2 > file1
cause the original data in file1 to be lost; take care when using the
shell special characters to specify files for cat to use.
Licensed material--property of copyright holder(s)