$ cut
Remove sections from each line of files
DOCUMENTEDSearch & textUbuntu 24.04 LTS baseline
Synopsis
cut OPTION... [FILE]...
What it does
- `cut` extracts selected bytes, characters, or fields depending on the option used.
- Field selection uses a delimiter supplied with `-d`.
Examples
Print the first field separated by ':'
cut -d: -f1 /etc/passwdPrint characters 1 through 10
cut -c1-10 file.txtImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.