Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-23 00:20:07 +00:00
parent a49466c200
commit cd59a77dc8
31 changed files with 239 additions and 130 deletions

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# nl
> Number lines from a file or from `stdin`.
> More information: <https://manned.org/nl.1p>.
> More information: <https://manned.org/man/nl>.
- Number non-blank lines in a file:
@@ -16,26 +16,26 @@ source: https://github.com/tldr-pages/tldr.git
`{{command}} | nl -`
- Number [a]ll [b]ody lines including blank lines or do [n]ot number [b]ody lines:
- Number [a]ll body lines including blank lines or do [n]ot number body lines:
`nl --body-numbering {{a|n}} {{path/to/file}}`
`nl {{[-b|--body-numbering]}} {{a|n}} {{path/to/file}}`
- Number only the [b]ody lines that match a basic regular expression (BRE) [p]attern:
- Number only the body lines that match a basic regular expression (BRE) [p]attern:
`nl --body-numbering p'FooBar[0-9]' {{path/to/file}}`
`nl {{[-b|--body-numbering]}} p'FooBar[0-9]' {{path/to/file}}`
- Use a specific [i]ncrement for line numbering:
- Use a specific increment for line numbering:
`nl --line-increment {{increment}} {{path/to/file}}`
`nl {{[-i|--line-increment]}} {{increment}} {{path/to/file}}`
- Specify the line numbering format to [r]ight or [l]eft justified, keeping leading [z]eros or [n]ot:
`nl --number-format {{rz|ln|rn}}`
`nl {{[-n|--number-format]}} {{rz|ln|rn}}`
- Specify the line numbering's [w]idth (6 by default):
- Specify the line numbering's width (6 by default):
`nl --number-width {{col_width}} {{path/to/file}}`
`nl {{[-w|--number-width]}} {{col_width}} {{path/to/file}}`
- Use a specific string to [s]eparate the line numbers from the lines (TAB by default):
- Use a specific string to separate the line numbers from the lines (TAB by default):
`nl --number-separator {{separator}} {{path/to/file}}`
`nl {{[-s|--number-separator]}} {{separator}} {{path/to/file}}`