I have a text file as follows:
aaaa bbbb ---- cccc ---- dddd
How can I use
---- as delimiter and take out for example dddd or cccc? By take out I mean run a command and get "dddd" if my input indicates I want the 3rd field of the whole file. It seems that
cut operates on only one line, so I couldn't think of any way to do this with these commands.