folks I have string
str1="MVM GT RT BHHT SYSTEMG RW"
I need to get "BHHT" and add it to variable str2.
I shouldn't use file. I need something like this:
str1 | cut -d ' ' -f 3
This can be done with variable expansion
# removes the first three fields ( # for the shortest prefix )
str2=${str1#* * * }
# removes all after next space ( %% for the largest suffix )
elem=${str2%% *}