morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base.git
Log | Files | Refs

nl.1 (813B)


      1 .Dd December 4, 2014
      2 .Dt NL 1 sbase\-VERSION
      3 .Os
      4 .Sh NAME
      5 .Nm nl
      6 .Nd line numbering filter
      7 .Sh SYNOPSIS
      8 .Nm nl
      9 .Op Fl b Ar type
     10 .Op Fl i Ar incr
     11 .Op Fl s Ar sep
     12 .Op Ar file
     13 .Sh DESCRIPTION
     14 .Nm
     15 reads lines from the named
     16 .Ar file
     17 and writes them to stdout with non-empty lines
     18 numbered.  If no file is given
     19 .Nm
     20 reads from stdin.
     21 .Sh OPTIONS
     22 .Bl -tag -width Ds
     23 .It Fl b Ar type
     24 Defines which lines will be numbered:
     25 .Bl -tag -width pstringXX
     26 .It a
     27 All lines.
     28 .It n
     29 No lines.
     30 .It t
     31 Only non-empty lines (default).
     32 .It p Ns Ar expr
     33 Only lines which match
     34 .Ar expr ,
     35 a regular expression as defined in
     36 .IR regex (7).
     37 .TP
     38 .El
     39 .It Fl i Ar incr
     40 Defines the increment between numbered lines.
     41 .It Fl s Ar sep
     42 Defines the string used to separate line numbers and lines.  By default this is
     43 a tab.
     44 .El
     45 .Sh SEE ALSO
     46 .Xr pr 1