home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Utilities / mac-shell-05b / MacShell / MacShell.rsrc / help_16413_cat < prev    next >
Encoding:
Text File  |  1994-11-23  |  1.2 KB  |  28 lines

  1. cat - Echo the input to the output.
  2.  
  3. SYNTAX
  4.    cat [filename...] [-r filename] [-]
  5.  
  6. DESCRIPTION
  7.  
  8. The command "cat" opens files whose names are given as arguments, and places their contents on standard output.  If no arguments are given, standard input will be used instead.
  9.  
  10. By default, cat reads data forks of files whose names are specified on the command line.  However, the resource fork of a file will be read if its name is preceded by the flag "-r".  
  11.  
  12. The command line may be constructed with many file names and many instances of the flag "-r".  The appropriate forks of the named files will be read in turn, and their contents placed on the output.
  13.  
  14. Standard input will be read by default if no file names are found on the command line.  To force the standard input to be read anyway, even if the command line does contain file names, the special marker "-" may be used.  
  15.  
  16. EXAMPLES
  17.  
  18. In the following example both forks of the file "file1" are read (data fork first) and placed on the output:
  19.     cat file1 -r file1
  20.  
  21. This example shows how the output of grep may be framed by the contents of two files: the data fork of file1 and the resource fork of file3:
  22.     grep key file2 | cat file1 - -r file3
  23.  
  24. SEE ALSO
  25.     
  26.     head, tail
  27.