Jakson kuvaus
The 'nl' command adds line numbers to files or to terminal output.
+ Number non-blank lines in a file:
nl path/to/file
+ Number non-blank lines in ouptut from stdin:
command | nl
ex: seq 10 | nl
+ Number [a]ll [b]ody lines including blank lines or do [n]ot number body lines:
nl -b a path/to/file
+ Do [n]ot number [b]ody lines (essentially this suppresses the line numbers):
nl -b n path/to/file
NOTE The above command is not that different than 'cat' or 'less' except that 'nl -b n' does reserve space for where the line numbers would have been.
+ Number only the lines matching a basic…
Sivusto: odysee.com
