| CUT(1) | General Commands Manual | CUT(1) |
cut — cut each
line with selected characters/fields
cut |
-b list
[-nz] [file...] |
cut |
-c list
[-z] [file...] |
cut |
-f list
[-d delim]
[-sz] [file...] |
cut reads lines from each each
file or if unspecified standard input, and cuts out
bytes (-b), characters (-c),
or character-delimited fields (-f).
The list argument is a comma-separated list of 1-based ranges, where:
n-’n’ to the end of
line.n’n’n-m’n’ to
‘m’.-m’m’.1,2,3’1-3’-b
list-c
list-d
delim-f
list-n-s-zThe cut utility exits 0 on success,
and >0 if an error occurs.
Except for the lack of support for -n,
cut should be compliant with the IEEE Std
1003.1-2024 (“POSIX.1”) specification.
Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
| September 12, 2024 | Linux |