[Top] [Prev] [Next] [Bottom]


[Contents] [Index]

cat - concatenate files

cat [-] [file...]

Description

The cat command reads each file in sequence and writes it on the standard output. The following command prints the file to standard output:

	cat file

The following command concatenates two files into a third:

	cat file1 file2 >file3

If no file is given, or if minus (-) is given as an argument cat reads from the standard input.

Caveat

Beware of cat a b >a and cat a b >b, which destroy input files before reading them.

See Also

read, write, stream - read, write, or stream file in Chapter 8
Integer file descriptor in Chapter 8



[Top] [Prev] [Next] [Bottom]

infernosupport@lucent.com
Copyright © 1997, Lucent Technologies, Inc.. All rights reserved.