mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 05:42:09 +02:00
cut: edit page (#12733)
This commit is contained in:
parent
ba4ee02bc1
commit
2ecc25e812
1 changed files with 7 additions and 3 deletions
|
@ -3,14 +3,18 @@
|
||||||
> Cut out fields from `stdin` or files.
|
> Cut out fields from `stdin` or files.
|
||||||
> More information: <https://www.gnu.org/software/coreutils/cut>.
|
> 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}}`
|
`{{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}}`
|
`{{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}}`
|
`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}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue