cut
Linux · Text · available in the simulator
What it does
Remove sections from each line of files (fields or characters).
Syntax
cut [-d delim] [-f campos] [-c caracteres] [archivo...]
Options and parameters
-d CUse delimiter character instead of TAB.
-f NSelect only these fields.
-c N-MSelect only these characters.
-dUse specified delimiter instead of TAB for field delimiter.
cut -d: -f1 /etc/passwd-fSelect only these fields.
-cSelect only these characters.
cut -c1-10 archivo.txt-bSelect only these bytes.
--complementComplement the set of selected bytes, characters or fields.
Usage examples
cut -d: -f1 /etc/passwdcut -c1-10 archivo.txtcut -c1-10 archivo