home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils~1 / man / manpages.zoo / csplit.1 < prev    next >
Encoding:
Text File  |  1991-11-11  |  3.3 KB  |  133 lines

  1.  
  2.  
  3.  
  4. CSPLIT(1L)                                             CSPLIT(1L)
  5.  
  6.  
  7.  
  8. NAME
  9.      csplit - split a file into sections determined by context
  10.      lines
  11.  
  12. SYNOPSIS
  13.      csplit [-sk] [-f prefix] [-n digits] [+prefix=prefix]
  14.      [+digits=digits] [+quiet] [+silent] [+keep-files] file pat-
  15.      tern...
  16.  
  17. DESCRIPTION
  18.      This manual page documents the GNU version of csplit.
  19.      csplit creates zero or more output files containing sections
  20.      of the given input _✓f_✓i_✓l_✓e, or the standard input if the name
  21.      `-' is given.  By default, csplit prints the number of bytes
  22.      written to each output file after it has been created.
  23.  
  24.      The contents of the output files are determined by the _✓p_✓a_✓t_✓-
  25.      _✓t_✓e_✓r_✓n 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.  The
  28.      types of pattern arguments are:
  29.  
  30.           _✓l_✓i_✓n_✓e
  31.                Create an output file containing the current line
  32.                up to (but not including) line _✓l_✓i_✓n_✓e (a positive
  33.                integer) of the input file.  If followed by a
  34.                repeat count, also create an output file contain-
  35.                ing the next _✓l_✓i_✓n_✓e lines of the input file once for
  36.                each repeat.
  37.  
  38.           /_✓r_✓e_✓g_✓e_✓x_✓p/[_✓o_✓f_✓f_✓s_✓e_✓t]
  39.                Create an output file containing the current line
  40.                up to (but not including) the next line of the
  41.                input file that contains a match for _✓r_✓e_✓g_✓e_✓x_✓p.  The
  42.                optional _✓o_✓f_✓f_✓s_✓e_✓t is a `+' or `-' followed by a
  43.                positive integer; if it is given, the line that
  44.                starts the next section of the input file is the
  45.                line that contains the match for _✓r_✓e_✓g_✓e_✓x_✓p plus the
  46.                offset.
  47.  
  48.           %_✓r_✓e_✓g_✓e_✓x_✓p%[_✓o_✓f_✓f_✓s_✓e_✓t]
  49.                Like the previous type, except that it does not
  50.                create an output file, so that section of the
  51.                input file is effectively ignored.
  52.  
  53.           {_✓r_✓e_✓p_✓e_✓a_✓t-_✓c_✓o_✓u_✓n_✓t}
  54.                Repeat the previous pattern _✓r_✓e_✓p_✓e_✓a_✓t-_✓c_✓o_✓u_✓n_✓t (a posi-
  55.                tive integer) additional times.
  56.  
  57.      The output file names consist of a prefix followed by a
  58.      number, so that concatenating the output files in sorted
  59.      order by file name produces the original input file, in
  60.  
  61.  
  62.  
  63. Page 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CSPLIT(1L)                                             CSPLIT(1L)
  71.  
  72.  
  73.  
  74.      order.  The default output file name prefix is `xx'.
  75.  
  76.      By default, if csplit encounters an error or receives a
  77.      hangup, interrupt, quit, or terminate signal, it removes any
  78.      output files that it has created so far before it exits.
  79.  
  80.      OPTIONS
  81.  
  82.      -_✓f, +_✓p_✓r_✓e_✓f_✓i_✓x=_✓p_✓r_✓e_✓f_✓i_✓x
  83.           Use _✓p_✓r_✓e_✓f_✓i_✓x as the output file name prefix.
  84.  
  85.      -_✓k, +_✓k_✓e_✓e_✓p-_✓f_✓i_✓l_✓e_✓s
  86.           Do not remove output files.
  87.  
  88.      -_✓n, +_✓d_✓i_✓g_✓i_✓t_✓s=_✓d_✓i_✓g_✓i_✓t_✓s
  89.           Use output file names containing numbers that are
  90.           _✓d_✓i_✓g_✓i_✓t_✓s digits long instead of the default 2.
  91.  
  92.      -_✓s, +_✓s_✓i_✓l_✓e_✓n_✓t, +_✓q_✓u_✓i_✓e_✓t
  93.           Do not print counts of output file sizes.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  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. Page 2
  130.  
  131.  
  132.  
  133.