cut - remove sections from each line
cut [-d DELIM] -f LIST | -c LIST [file]...
Options you will use
-d DELIM- Use DELIM instead of TAB as the field delimiter.
-f LIST- Select these fields: 1, 1,3, 2-, 1-3.
-c LIST- Select these character positions.
-c, --characters LIST- Select only these character positions: -c1-19, -c5, -c12-16.
-d, --delimiter DELIM- Use DELIM instead of TAB as the field separator: -d: -d, -d' '.
-f, --fields LIST- Select only these fields: -f1, -f1,3, -f2-4, -f3-.
-b, --bytes LIST- Select only these bytes.
-s, --only-delimited- Skip lines that do not contain the delimiter.
--complement- Print everything EXCEPT the selected fields.
Gotchas
- cut cannot treat runs of spaces as one delimiter. That is when you switch to awk.
Taught in
Try cut in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.