cut -d'<sep>' -f<n> <file>Prints field n using a delimiter — here, every user name.
Example
cut -d: -f1 /etc/passwdExtracts columns, fields or characters from each line of input.
sudo apt install coreutilscut -d'<sep>' -f<n> <file>Prints field n using a delimiter — here, every user name.
Example
cut -d: -f1 /etc/passwdcut -d'<sep>' -f<a>,<b> <file>Prints several fields; the delimiter is kept between them.
Example
cut -d: -f1,6 /etc/passwdcut -d'<sep>' -f<a>- <file>Prints field n and everything after it.
Example
cut -d, -f3- data.csvcut -d'<sep>' -f<n> --output-delimiter='<s>' <file>Changes the delimiter used in the output (GNU).
Example
cut -d: -f1,7 --output-delimiter=' -> ' /etc/passwdcut -d'<sep>' -s -f<n> <file>Skips lines that do not contain the delimiter.
Example
cut -d= -s -f2 settings.confA pattern-scanning language for column-based text: extract fields, compute totals and reformat output.
Sorts lines of text alphabetically, numerically, by field or by human-readable size.
A stream editor for filtering and transforming text: substitutions, deletions and in-place file edits.