sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

nl.1 (1696B)


      1 .Dd 2015-10-08
      2 .Dt NL 1
      3 .Os sbase
      4 .Sh NAME
      5 .Nm nl
      6 .Nd line numbering filter
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl p
     10 .Op Fl b Ar type
     11 .Op Fl d Ar delim
     12 .Op Fl f Ar type
     13 .Op Fl h Ar type
     14 .Op Fl i Ar num
     15 .Op Fl l Ar num
     16 .Op Fl n Ar format
     17 .Op Fl s Ar sep
     18 .Op Fl v Ar num
     19 .Op Fl w Ar num
     20 .Op Ar file
     21 .Sh DESCRIPTION
     22 .Nm
     23 reads lines from
     24 .Ar file
     25 and writes them to stdout, numbering non-empty lines.
     26 If no
     27 .Ar file
     28 is given
     29 .Nm
     30 reads from stdin.
     31 .Sh OPTIONS
     32 .Bl -tag -width Ds
     33 .It Fl p
     34 Do not reset line number for logical pages.
     35 .It Fl h Ar type | Fl b Ar type | Fl f Ar type
     36 Define which lines to number in the head | body | footer section:
     37 .Bl -tag -width pstringXX
     38 .It a
     39 All lines.
     40 .It n
     41 No lines.
     42 .It t
     43 Only non-empty lines. This is the default.
     44 .It p Ns Ar expr
     45 Only lines matching
     46 .Ar expr
     47 according to
     48 .Xr regex 7 .
     49 .El
     50 .It Fl d Ar delim
     51 Set
     52 .Ar delim
     53 as the delimiter for logical pages. If
     54 .Ar delim
     55 is only one character,
     56 .Nm
     57 appends ":" to it. The default is "\e:".
     58 .It Fl i Ar num
     59 Set the increment between numbered lines to
     60 .Ar num .
     61 .It Fl l Ar num
     62 Set the number of adjacent blank lines to be considered as one to
     63 .Ar num .
     64 The default is 1.
     65 .It Fl n Ar format
     66 Set the line number output
     67 .Ar format
     68 to one of:
     69 .Bl -tag -width pstringXX
     70 .It ln
     71 Left justified.
     72 .It rn
     73 Right justified. This is the default.
     74 .It rz
     75 Right justified with leading zeroes.
     76 .El
     77 .It Fl s Ar sep
     78 Use
     79 .Ar sep
     80 to separate line numbers and lines. The default is "\et".
     81 .It Fl v Ar num
     82 Start counting lines from
     83 .Ar num .
     84 The default is 1.
     85 .It Fl w Ar num
     86 Set the width of the line number to
     87 .Ar num .
     88 The default is 6.
     89 .El
     90 .Sh SEE ALSO
     91 .Xr pr 1
     92 .Sh STANDARDS
     93 The
     94 .Nm
     95 utility is compliant with the
     96 .St -p1003.1-2013
     97 specification.