Manpage logo

nl - line numbering filter

NAME  SYNOPSIS  DESCRIPTION  OPTIONS  BUGS  AUTHOR  LICENSE AND COPYRIGHT 

NAME

nl − line numbering filter

SYNOPSIS

nl [−p] [−b type] [−d delim] [−f type] [−h type] [−i incr]
[−n format] [−s sep] [−v startnum] [−w width] [file]

DESCRIPTION

nl prints its input file to standard output, with line numbers added. If file is a dash "−" or if no file is given as argument, nl reads from standard input.

OPTIONS

The following options are supported.

−b type 'a' all lines
't' only non−empty lines (default)
'n' no numbering
'pexpr' only lines matching pattern specified by expr
'eexpr' exclude lines matching pattern specified by expr
−d delim characters (max 2) indicating new section (default : '\\:')
−f type same as −b but for footer lines (default : 'n')
−h type same as −b but for header lines (default : 'n')
−i incr increment value (default : 1)
−n format 'ln' left justified
'rn' right justified without leading zeros (default)
'rz' right justified with leading zeros
−p single page (don't restart numbering at pages delimiters)
−s sep characters between number and text line (default : TAB)
−v startnum initial value to number pages (default : 1)
−w width line number width (default : 6)

BUGS

Please report any bugs or feature requests to "[email protected]", or through the web interface at <https://github.com/briandfoy/PerlPowerTools/issues>.

AUTHOR

jul, "[email protected]"

LICENSE AND COPYRIGHT

This software is Copyright (c) 2020 by jul.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)


Updated 2026-06-01 - jenkler.se | uex.se