mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-15 06:12:59 +00:00
11 lines
296 B
Plaintext
11 lines
296 B
Plaintext
# nl
|
|
# Number lines of files
|
|
|
|
# Number lines given to nl(1) via STDIN.
|
|
printf "Here\nis\nsome\nexample\ntext." | nl
|
|
|
|
# Number (all) lines given to nl(1) via provided file(s).
|
|
nl -b a /path/to/file
|
|
# The above can also be achieved with cat(1), which is perhaps more portable:
|
|
cat -n /path/to/file
|