Extract columns, characters or bytes quickly from lines on the shell. 04.03.2026 | reading time: 2 min On the shell, `cut` slices columns, characters or bytes from lines so he can extract fields quickly from logs and CSVs; it is raw, fast and ideal for simple extraction tasks. Quick CSV extraction Create a tiny CSV then extract the name column: `printf "1,Alice,admin\n2,Bob,user\n3,Carol,dev\n" > users.csv` then `cut -d',' -f2 users.csv` prints `Alice\nBob\nCarol`; also `echo "foo:bar:baz" | cut -d':' -f2` prints `bar`. Options that change the game Use `-d` with `-f` to split fields, `-c` to select characters, `-b` to select bytes, `--complement` to invert selection and `-s` to suppress non-delimited lines; note that `-b` counts raw bytes while `-c` respects multibyte characters in the current locale, and GNU `cut` accepts `--output-delimiter` to change the joiner. When cut is not enough Cut is blind to field quoting and complex parsing, so reach for `awk` or a CSV-aware tool when fields contain embedded delimiters or quotes, or use `sed` and `paste` to transform streams before or after cutting. Next steps Practice by extracting columns from real logs and CSVs, then compare performance with `awk`; deepen skills and consider exam-focused study — bitsandbytes.academy offers intensive preparation for CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. utilities scripting filesystem