cut [options] [file...]Arguments explained
- -d sets a delimiter.
- -f selects fields.
- -c selects character positions.
Common examples
cut -d: -f1 /etc/passwdPrints the first colon-separated field.
cut -c1-8 file.txtPrints characters 1 through 8 of each line.
| Field | Details |
|---|---|
| Command | cut |
| Category | Text Processing |
| Primary use | Extracts sections from each line. |
| Syntax | cut [options] [file...] |