18 June 2015

info

  1. cat stands for catenate

    1. read data from files

    2. output file contents

  2. can be used to

    1. display text fies

    2. copy text files into new file

    3. append contents of a text file to the end of another text file

usage

  1. displaying text files

         $ cat textfile
    
         $ cat textfile1 textfile2
    
  2. copy a text file

    1. shell redirection

       $ cat textfile1 > textfile2
      
    2. catenate serveral files into destination file

       $ cat textfile1 textfile2 > textfile3
      
  3. append text file to another text file

         $ cat textfile1 >> textfile2
    
         $ cat textfile1 textfile2 >> textfile3
    

options

  1. -A equivalent to -vET

  2. -E display “$” at end of each line

  3. -n number all output lines

  4. -T display TAB characters as ^I



blog comments powered by Disqus