I have no problem using cut, take a look:
STR='John 25 Developer Alice 30 Manager Bob 28 Analyst '; CCC=`echo $STR | cut -d' ' -f2,5,8` echo $CCC
Output: 25 30 28
Output:
25 30 28
https://onecompiler.com/bash/43ee7qmfy
can you try?