![]() |
![]() | |
![]() |
![]() |
concatenate and print files
cat [-c] [-u] [file...]
Write the contents of the file myfile to the standard output:
cat myfile
The cat utility reads files in the order you specify and writes the contents of these files to the standard output.
The cat utility writes the contents of the files named on the command line (which may include the standard input) to the standard output.
If an error is encountered (e.g. in attempting to open or read a file), a diagnostic message will be written to the standard error.
Because of the shell language mechanism used to perform output redirection, a command such as:
cat doc doc.end > doc
causes the original data in doc to be lost. The file
doc would be opened for write by the shell, and therefore
truncated to zero length, before cat was executed.
last updated: Mon Sep 30 14:59:38 2002 | webmaster@huarp.harvard.edu |
Copyright 2002 by the President and Fellows of Harvard College | |
[Home] [People] [More Info] [Research Areas] [Field Missions] [Engineering] |