home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GNUTUE.ZIP / man / nl.man < prev    next >
Text File  |  1992-07-18  |  4KB  |  110 lines

  1. NAME
  2.      nl - number lines of files
  3.  
  4. SYNOPSIS
  5.      nl [-h header-style] [-b body-style] [-f footer-style] [-p] [-d  cc]  [-v
  6.      start-number]  [-i increment] [-l lines] [-s line-separator] [-w line-no-
  7.      width]    [-n     {ln,rn,rz}]     [--header-numbering=style]     [--body-
  8.      numbering=style]     [--footer-numbering=style]     [--first-page=number]
  9.      [--page-increment=number]   [--no-renumber]   [--join-blank-lines=number]
  10.      [--number-separator=string]       [--number-width=number]      [--number-
  11.      format={ln,rn,rz}] [--section-delimiter=cc] [file...]
  12.  
  13. DESCRIPTION
  14.      This manual page documents the GNU version of nl.  nl copies  each  given
  15.      file, or the standard input if none are given or when a file named `-' is
  16.      given, to the standard output, with line numbers added to some or all  of
  17.      the lines.
  18.  
  19.      nl considers its input to be composed of logical pages; by  default,  the
  20.      line number is reset to 1 at the top of each logical page.  nl treats all
  21.      of the input files as a single document; it does not reset  line  numbers
  22.      or logical pages between files.
  23.  
  24.      A logical page consists of three sections: header, body, and footer.  Any
  25.      of  the sections can be empty.  Each can be numbered in a different style
  26.      from the others.
  27.  
  28.      The beginnings of the sections of logical  pages  are  indicated  in  the
  29.      input  file  by  a  line  containing  nothing except one of the delimeter
  30.      strings shown below:
  31.  
  32.      \:\:\: start of header
  33.      \:\: start of body
  34.      \: start of footer
  35.  
  36.      The two characters from which these strings are made can be changed  with
  37.      an  option  (see below), but the pattern and length of each string cannot
  38.      be changed.
  39.  
  40.      The section delimiter strings are replaced by an empty  line  on  output.
  41.      Any  text  that  comes  before  the first section delimiter string in the
  42.      input file is considered to be part of a body section,  so  a  file  that
  43.      does  not  contain any section delimiter strings is considered to consist
  44.      of a single body section.
  45.  
  46.      OPTIONS
  47.  
  48.      -h, --header-numbering=style
  49.           See --footer-numbering.
  50.  
  51.      -b, --body-numbering=style
  52.           See --footer-numbering.
  53.  
  54.      -f, --footer-numbering=style
  55.           Select the numbering style for lines in the footer section  of  each
  56.           logical  page.  When a line is not numbered, the current line number
  57.           is not incremented, but the line number separator character is still
  58.           prepended to the line.  The styles are:
  59.  
  60.      a    number all lines
  61.  
  62.      t    number only nonempty lines (default for body)
  63.  
  64.      n    number no lines (default for header and footer)
  65.  
  66.      pregexp
  67.           number only lines that contain a match for regexp
  68.  
  69.      -p, --no-renumber
  70.           Do not reset the line number at the start of a logical page.
  71.  
  72.      -v, --first-page=number
  73.           Set the initial line number on each logical page to number  (default
  74.           1).
  75.  
  76.      -i, --page-increment=number
  77.           Increment line numbers by number (default 1).
  78.  
  79.      -l, --join-blank-lines=number
  80.           Consider number (default  1)  consecutive  empty  lines  to  be  one
  81.           logical  line  for  numbering,  and only number the last one.  Where
  82.           fewer than number consecutive empty lines occur, do not number them.
  83.           An empty line is one that contains no characters, not even spaces or
  84.           tabs.
  85.  
  86.      -s, --number-separator=string
  87.           Separate the line number from the  text  line  in  the  output  with
  88.           string (default is a TAB character).
  89.  
  90.      -w, --number-width=number
  91.           Use number characters for line numbers (default 6).
  92.  
  93.      -n, --number-format={ln,rn,rz}
  94.           Select the line numbering format:
  95.  
  96.      ln   left justified, no leading zeros
  97.  
  98.      rn   right justified, no leading zeros (default)
  99.  
  100.      rz   right justified, leading zeros
  101.  
  102.      -d, --section-delimiter=cc
  103.           Set the two delimeter characters that  indicate  the  beginnings  of
  104.           logical page sections; if only one is given, the second remains ':'.
  105.           To enter '\', use '\\'.
  106.  
  107.      The long-named options can be introduced with `+' as well  as  `--',  for
  108.      compatibility with previous releases.  Eventually support for `+' will be
  109.      removed, because it is incompatible with the POSIX.2 standard.
  110.