The following works correctly on bash:
a=$(echo '111 222 33' | awk '{print $3;}' )
echo $a # result is "33"
Another option would be to convert the string to an array:
a="111 222 333"
b=($a)
echo ${b[2]} # returns 333
The following works correctly on bash:
a=$(echo '111 222 33' | awk '{print $3;}' )
echo $a # result is "33"
Another option would be to convert the string to an array:
a="111 222 333"
b=($a)
echo ${b[2]} # returns 333