home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / doc / csplit.man < prev    next >
Text File  |  1993-06-13  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. CSPLIT(1L)                                             CSPLIT(1L)
  5.  
  6.  
  7. NAME
  8.        csplit  - split a file into sections determined by context
  9.        lines
  10.  
  11. SYNOPSIS
  12.        csplit [-sk] [-f  prefix]  [-n  digits]  [--prefix=prefix]
  13.        [--digits=digits]   [--quiet]   [--silent]  [--keep-files]
  14.        [--help] [--version] file pattern...
  15.  
  16. DESCRIPTION
  17.        This manual page documents  the  GNU  version  of  csplit.
  18.        csplit  creates  zero or more output files containing sec-
  19.        tions of the given input file, or the  standard  input  if
  20.        the name `-' is given.  By default, csplit prints the num-
  21.        ber of bytes written to each output file after it has been
  22.        created.
  23.  
  24.        The  contents  of  the  output files are determined by the
  25.        pattern arguments.  An error occurs if a pattern  argument
  26.        refers to a nonexistent line of the input file, such as if
  27.        no remaining line  matches  a  given  regular  expression.
  28.        After  all  the  given  patterns  have  been  matched, any
  29.        remaining output is copied into one last output file.  The
  30.        types of pattern arguments are:
  31.  
  32.               line
  33.                      Create an output file containing the current
  34.                      line up to (but not including) line line  (a
  35.                      positive  integer)  of  the  input file.  If
  36.                      followed by a repeat count, also  create  an
  37.                      output  file  containing the next line lines
  38.                      of the input file once for each repeat.
  39.  
  40.               /regexp/[offset]
  41.                      Create an output file containing the current
  42.                      line up to (but not including) the next line
  43.                      of the input file that contains a match  for
  44.                      regexp.  The optional offset is a `+' or `-'
  45.                      followed by a positive integer.   If  it  is
  46.                      given,  the  input  up  to the matching line
  47.                      plus or minus offset is put into the  output
  48.                      file,  and  the  line  after that begins the
  49.                      next section of input.
  50.  
  51.               %regexp%[offset]
  52.                      Like the previous type, except that it  does
  53.                      not  create  an output file, so that section
  54.                      of the input file is effectively ignored.
  55.  
  56.               {repeat-count}
  57.                      Repeat the previous pattern repeat-count  (a
  58.                      positive integer) additional times.
  59.  
  60.        The  output  file  names consist of a prefix followed by a
  61.  
  62.  
  63.  
  64. FSF                     GNU Text Utilities                      1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CSPLIT(1L)                                             CSPLIT(1L)
  71.  
  72.  
  73.        number, so that concatenating the output files  in  sorted
  74.        order  by  file  name produces the original input file, in
  75.        order.  The default output file name prefix is `xx'.
  76.  
  77.        By default, if csplit encounters an error  or  receives  a
  78.        hangup,  interrupt,  quit, or terminate signal, it removes
  79.        any output files that it has  created  so  far  before  it
  80.        exits.
  81.  
  82.    OPTIONS
  83.        -f, --prefix=prefix
  84.               Use prefix as the output file name prefix.
  85.  
  86.        -k, --keep-files
  87.               Do not remove output files.
  88.  
  89.        -n, --digits=digits
  90.               Use  output  file names containing numbers that are
  91.               digits digits long instead of the default 2.
  92.  
  93.        -s, --silent, --quiet
  94.               Do not print counts of output file sizes.
  95.  
  96.        --help Print a usage message and exit with a non-zero sta-
  97.               tus.
  98.  
  99.        --version
  100.               Print  version  information  on standard error then
  101.               exit.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. FSF                     GNU Text Utilities                      2
  131.  
  132.  
  133.