

            find (1) --- look for a pattern                          08/27/84


          | _U_s_a_g_e

          |      find <pattern> { -{<option>} } { <file_spec> }
          |         <option> ::=  c | i | l | o[<occurrences>] | v | x
          |         <file_spec> ::= <filename> | -[<stdin_number>] |
          |                           -n(<stdin_number>|<filename>)


            _D_e_s_c_r_i_p_t_i_o_n

                 'Find'  is a filter that selects lines matching a given pat-
                 tern from the named files (or standard input if no files are
                 specified) and copies them to standard output.  The  pattern
                 supplied  as the first argument is a regular expression with
                 the  full  set  of  options  found  in  the  editor.    (See
                 _I_n_t_r_o_d_u_c_t_i_o_n  _t_o  _t_h_e  _S_o_f_t_w_a_r_e  _T_o_o_l_s  _T_e_x_t  _E_d_i_t_o_r  in the
                 _S_o_f_t_w_a_r_e _T_o_o_l_s _S_u_b_s_y_s_t_e_m _U_s_e_r_'_s _G_u_i_d_e for details.)

          |      The available options are:

          |           -c   If the "c" option is used, only  a  count  of  the
          |                lines that matched (differed) is printed.

          |           -i   If the "i" option is used, the case of the pattern
          |                and the text of the search file(s) is ignored.

          |           -l   If  the  "l"  option is used, each line printed is
          |                preceded by its relative line  number  within  the
          |                file from which it was read.

          |           -o   If  the "o" option is used, find will quit search-
          |                ing the current file after <occurrences>  matching
          |                (differing)  lines have been found in it, and will
          |                continue with the next file.  If "o" is  specified
          |                but  <occurrences>  is  omitted,  only  the  first
          |                occurrence is found.

          |           -v   If the "v" option is specified, each line of  out-
          |                put  is  labelled  with the name of the input file
          |                from which the line was read.

          |           -x   If the "x" option is used, or if the first charac-
          |                ter of the pattern is a tilde  ("~"),  only  lines
          |                that do not match the pattern are printed.

          |      The  remaining  command line arguments are taken as names of
          |      files to be searched for the pattern.  The  full  syntax  of
          |      the <file_spec> argument is described in the entry for 'cat'
          |      (1).   Most frequently, it will take the form of a Subsystem
          |      pathname.

                 'Find' is frequently used for processing  output  from  'lf'
                 before  performing  some operation on a number of files, and
                 for stripping out "uninteresting"  lines  from  data  to  be
                 further processed by other tools.



            find (1)                      - 1 -                      find (1)




            find (1) --- look for a pattern                          08/27/84


            _E_x_a_m_p_l_e_s

                 lf -c | find .r$
                 lf -c | find .r$ | find call -lv -n
                 find CALL -lv [lf -c | find .f$]
                 find "format" -c rf.r ed.r


            _M_e_s_s_a_g_e_s

                 "Usage:  find ..."  for bad arguments.
                 "illegal pattern" for bad pattern syntax.
                 "file:  can't open" for unreadable files.


            _S_e_e _A_l_s_o

          |      cat  (1),  change  (1), ffind (1), files (1), se (1), makpat
          |      (2), amatch (2), match (2),  _I_n_t_r_o_d_u_c_t_i_o_n  _t_o  _t_h_e  _S_o_f_t_w_a_r_e
                 _T_o_o_l_s _T_e_x_t _E_d_i_t_o_r






































            find (1)                      - 2 -                      find (1)


