mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-21 00:38:17 +03:00
nl: add page (fixes #1163)
This commit is contained in:
parent
16969bf3dc
commit
60ebf37f35
24
pages/linux/nl.md
Normal file
24
pages/linux/nl.md
Normal file
@ -0,0 +1,24 @@
|
||||
# nl
|
||||
|
||||
> A utility for numbering lines, either from a file, or from standard input.
|
||||
|
||||
- Number lines in a file:
|
||||
|
||||
`nl {{source_file}}`
|
||||
|
||||
- Number lines where there is printable text only:
|
||||
|
||||
`nl -t {{source_file}}`
|
||||
|
||||
- Number lines that match a regular expression (Starting with a Capital
|
||||
A is Exampled):
|
||||
|
||||
`nl -b p^A {{source_file}}`
|
||||
|
||||
- Can be useful as an alternative to grep {{source_file}} -n
|
||||
{{search_term}}:
|
||||
|
||||
`nl ./file | grep match`
|
||||
|
||||
Which outputs `{{line_number}} {{search_term}}`
|
||||
|
Loading…
Reference in New Issue
Block a user