A sed
solution that selects a column by number:
echo 0 1 2 3 iv 5 6 | sed -E 's/^(\S+\s+){4}(\S+).*/\2/'
or
echo 0 1 2 3 iv 5 6 | sed 's/^\(\S\+\s\+\)\{4\}\(\S\+\).*/\2/'
replace the 4
(not the \2
at the end) with the column number you want, starting from zero.
Column delimiters are any combination of any number of tabs and spaces.
-r
flag uses extended regex syntax which is more concise.