


CSPLIT(1L)                                             CSPLIT(1L)


NNAAMMEE
       csplit  - split a file into sections determined by context
       lines

SSYYNNOOPPSSIISS
       ccsspplliitt [-sk] [-f  prefix]  [-n  digits]  [--prefix=prefix]
       [--digits=digits] [--quiet] [--silent] [--keep-files] file
       pattern...

DDEESSCCRRIIPPTTIIOONN
       This manual page documents  the  GNU  version  of  ccsspplliitt.
       ccsspplliitt  creates  zero or more output files containing sec-
       tions of the given input _f_i_l_e, or the  standard  input  if
       the name `-' is given.  By default, ccsspplliitt prints the num-
       ber of bytes written to each output file after it has been
       created.

       The  contents  of  the  output files are determined by the
       _p_a_t_t_e_r_n arguments.  An error occurs if a pattern  argument
       refers to a nonexistent line of the input file, such as if
       no remaining line matches a given regular expression.  The
       types of pattern arguments are:

              _l_i_n_e
                     Create an output file containing the current
                     line up to (but not including) line _l_i_n_e  (a
                     positive  integer)  of  the  input file.  If
                     followed by a repeat count, also  create  an
                     output  file  containing the next _l_i_n_e lines
                     of the input file once for each repeat.

              /_r_e_g_e_x_p/[_o_f_f_s_e_t]
                     Create an output file containing the current
                     line up to (but not including) the next line
                     of the input file that contains a match  for
                     _r_e_g_e_x_p.  The optional _o_f_f_s_e_t is a `+' or `-'
                     followed by a positive  integer;  if  it  is
                     given, the line that starts the next section
                     of the input file is the line that  contains
                     the match for _r_e_g_e_x_p plus the offset.

              %_r_e_g_e_x_p%[_o_f_f_s_e_t]
                     Like  the previous type, except that it does
                     not create an output file, so  that  section
                     of the input file is effectively ignored.

              {_r_e_p_e_a_t_-_c_o_u_n_t}
                     Repeat  the previous pattern _r_e_p_e_a_t_-_c_o_u_n_t (a
                     positive integer) additional times.

       The output file names consist of a prefix  followed  by  a
       number,  so  that concatenating the output files in sorted
       order by file name produces the original  input  file,  in
       order.  The default output file name prefix is `xx'.



                                                                1





CSPLIT(1L)                                             CSPLIT(1L)


       By  default,  if  ccsspplliitt encounters an error or receives a
       hangup, interrupt, quit, or terminate signal,  it  removes
       any  output  files  that  it  has created so far before it
       exits.

   OOPPTTIIOONNSS
       _-_f_, _-_-_p_r_e_f_i_x_=_p_r_e_f_i_x
              Use _p_r_e_f_i_x as the output file name prefix.

       _-_k_, _-_-_k_e_e_p_-_f_i_l_e_s
              Do not remove output files.

       _-_n_, _-_-_d_i_g_i_t_s_=_d_i_g_i_t_s
              Use output file names containing numbers  that  are
              _d_i_g_i_t_s digits long instead of the default 2.

       _-_s_, _-_-_s_i_l_e_n_t_, _-_-_q_u_i_e_t
              Do not print counts of output file sizes.

       The  long-named options can be introduced with `+' as well
       as `--', for compatibility with previous releases.   Even-
       tually  support  for  `+'  will  be removed, because it is
       incompatible with the POSIX.2 standard.


































                                                                2


