cut: edit page (#12733)
This commit is contained in:
@@ -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}}`
|
||||||
|
Reference in New Issue
Block a user