O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

nl

Format:

nl options file 

Options:

-I Increment each line number by n; the default is 1
-p Do not reset the numbering when a new page is met

nl is used to number a file, and is useful for printing out source code or log file listings.

					$ nl myscript
				

will number the file myscript,and

					$ nl myscript >hold_file
				

redirects the output of nl to the file hold_file, while

					$ nl myscript |lpr
				

redirects the output of nl to the printer.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required