cat-concatenates and displays files

 <  Day Day Up  >  

cat ” concatenates and displays files

 cat [ bnsuvet ] filename... 

cat reads each filename in sequence and writes it on the standard output. If no input file is given, or if the argument is encountered , cat reads from the standard input file.

Example A.9.
 1   cat /etc/passwd 2   cat -n file1 file2 >> file3 

EXPLANATION

  1. Displays the contents of the /etc/passwd file.

  2. Concatenates file1 and file2 and appends output to file3 . The “n switch causes each line to be numbered.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net