

            cat (1) --- concatenate and print files                  08/24/84


          | _U_s_a_g_e

          |      cat { <file_spec> | -h | -s }

                 <file_spec> ::= <filename> | -[<stdin_number>] |
                                 -n(<stdin_number>|<filename>)


            _D_e_s_c_r_i_p_t_i_o_n

                 'Cat'  concatenates  the  contents of the files specified in
                 its argument list and writes the result on its  first  stan-
                 dard  output.   Files to be concatenated may be specified in
                 any of several ways:

                 <filename>          an ordinary Subsystem pathname.

                 -<stdin_number>     a dash followed  by  a  decimal  number,
                                     'n',   designates   the  'n'th  standard
                                     input.  'n' must  be  a  legal  standard
                                     input number.

                 -                   this  is  the  same  as  specifying "-1"
                                     (i.e.  standard input 1).

                 -n<stdin_number>    "-n" followed by a  decimal  number  'n'
                                     indicates that the names of the files to
                                     be  concatenated are to be read from the
                                     'n'th standard input.

                 -n                  this is the same as "-n1".

                 -n<filename>        the   names   of   the   files   to   be
                                     concatenated  are  to  be  read from the
                                     named file.

                 If no arguments appear, the first  standard  input  file  is
                 copied to standard output until end-of-file.

                 If  the  "-h" argument is given, 'cat' precedes the contents
                 of each file copied with a header line consisting of  twenty
                 equals-signs  ("=")  followed  by  a  blank, the name of the
          |      file, another blank, and twenty more equals signs.

          |      If the "-s" argument is given, 'cat' will be  "silent".   In
          |      other words, if it cannot open a file, it will not complain.
          |      This  is mainly for the benefit of shell scripts like 'sep',
          |      and the Subsystem 'build' procedures.


            _E_x_a_m_p_l_e_s

                 cat time_sheet
                 cat >junk
                 print_file> cat
                 prog | cat -2 - >two_and_one


            cat (1)                       - 1 -                       cat (1)




            cat (1) --- concatenate and print files                  08/24/84


                 files .r$ | cat -n
                 cat -h -nnamelist >/dev/lps


            _M_e_s_s_a_g_e_s

          |      "<file>:  can't open" if it can't open the named  file,  and
          |      the "-s" option was not specified.


            _S_e_e _A_l_s_o

                 copy (1), cp (1), print (1), pr (1), tee (1), gfnarg (2)













































            cat (1)                       - 2 -                       cat (1)


