Contents[Hide]

1. Name

nl [man page] - number lines of files

2. Synopsis

nl [OPTION]... [FILE]... 

3. Frequently used options

-b, --body-numbering=STYLE
use STYLE for numbering body lines
-f, --footer-numbering=STYLE
use STYLE for numbering footer lines
-h, --header-numbering=STYLE
use STYLE for numbering header lines

4. Examples

$ echo -e "one\ntwo\nthree\nfour\nfive\n\nsix" > file 

nl - create a sample file

$ nl file 

nl - add line numbers

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top