cut: edit page (#12733)

pull/28/head
Fazle Arefin 2024-05-05 19:08:28 +10:00 committed by GitHub
parent ba4ee02bc1
commit 2ecc25e812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 3 deletions

View File

@ -3,14 +3,18 @@
> 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}}`