I have a space seperated string which is output by a command, which I like to pipe to cut, using -fd ' ' to split on spaces. I know I can use -f <n> to display field number <n>, but can I make it display the last field if I don't know the length of the string?
Or do I need to use a more flexible text editing tool like sed or awk?
-nmakes it the n from the start,n-is from n to the end, and there is the--complementoption which reverses the selection. But no way to count the number of fields and act upon it as far as I can tell. – Arronical Sep 30 '16 at 12:25