Print selected parts of lines e.g., from stdin or files.
Say one have a file with lines having the form x:y:z and one wants all the y's.
x:y:z
y
cut -d ':' -f 2 filename > output
Where -d specifies the delimiter one wants to cut on and -f specifies which field should be printed.
-d
-f
Full documentation can be found at https://man7.org/linux/man-pages/man1/cut.1.htmlarrow-up-right or with man cut.
man cut
Last updated 4 years ago