1NL(1)                            User Commands                           NL(1)
2
3
4

NAME

6       nl - number lines of files
7

SYNOPSIS

9       nl [OPTION]... [FILE]...
10

DESCRIPTION

12       Write each FILE to standard output, with line numbers added.
13
14       With no FILE, or when FILE is -, read standard input.
15
16       Mandatory  arguments  to  long  options are mandatory for short options
17       too.
18
19       -b, --body-numbering=STYLE
20              use STYLE for numbering body lines
21
22       -d, --section-delimiter=CC
23              use CC for logical page delimiters
24
25       -f, --footer-numbering=STYLE
26              use STYLE for numbering footer lines
27
28       -h, --header-numbering=STYLE
29              use STYLE for numbering header lines
30
31       -i, --line-increment=NUMBER
32              line number increment at each line
33
34       -l, --join-blank-lines=NUMBER
35              group of NUMBER empty lines counted as one
36
37       -n, --number-format=FORMAT
38              insert line numbers according to FORMAT
39
40       -p, --no-renumber
41              do not reset line numbers for each section
42
43       -s, --number-separator=STRING
44              add STRING after (possible) line number
45
46       -v, --starting-line-number=NUMBER
47              first line number for each section
48
49       -w, --number-width=NUMBER
50              use NUMBER columns for line numbers
51
52       --help display this help and exit
53
54       --version
55              output version information and exit
56
57       Default options are: -bt -d'\:' -fn -hn -i1 -l1 -n'rn' -s<TAB> -v1 -w6
58
59       CC are two delimiter characters used to construct logical  page  delim‐
60       iters;  a missing second character implies ':'.  As a GNU extension one
61       can specify more than two characters, and  also  specifying  the  empty
62       string (-d '') disables section matching.
63
64       STYLE is one of:
65
66       a      number all lines
67
68       t      number only nonempty lines
69
70       n      number no lines
71
72       pBRE   number only lines that contain a match for the basic regular ex‐
73              pression, BRE
74
75       FORMAT is one of:
76
77       ln     left justified, no leading zeros
78
79       rn     right justified, no leading zeros
80
81       rz     right justified, leading zeros
82

AUTHOR

84       Written by Scott Bartram and David MacKenzie.
85

REPORTING BUGS

87       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
88       Report any translation bugs to <https://translationproject.org/team/>
89
91       Copyright © 2023 Free Software Foundation, Inc.   License  GPLv3+:  GNU
92       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
93       This  is  free  software:  you  are free to change and redistribute it.
94       There is NO WARRANTY, to the extent permitted by law.
95

SEE ALSO

97       Full documentation <https://www.gnu.org/software/coreutils/nl>
98       or available locally via: info '(coreutils) nl invocation'
99
100
101
102GNU coreutils 9.3               September 2023                           NL(1)
Impressum