nl options file
|-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.