Update cheatsheets

This commit is contained in:
ivuorinen
2024-05-06 00:14:09 +00:00
parent fbad21c3c7
commit b1ff90caa8
4 changed files with 25 additions and 4 deletions

View File

@@ -8,14 +8,18 @@ source: https://github.com/tldr-pages/tldr.git
> Cut out fields from `stdin` or files.
> More information: <https://www.gnu.org/software/coreutils/cut>.
- Print a specific character/field range of each line:
- Print a specific [c]haracter/[f]ield range of each line:
`{{command}} | cut --{{characters|fields}} {{1|1,10|1-10|1-|-10}}`
- Print a field range of each line with a specific delimiter:
- Print a [f]ield range of each line with a specific [d]elimiter:
`{{command}} | cut --delimiter "{{,}}" --fields {{1}}`
- Print a character range of each line of the specific file:
- Print a [c]haracter range of each line of the specific file:
`cut --characters {{1}} {{path/to/file}}`
- Print specific [f]ields of `NUL` terminated lines (e.g. as in `find . -print0`) instead of newlines:
`{{command}} | cut --zero-terminated --fields {{1}}`