Sorry if it's a dumb q, but I couldn't find the answer! if I have var 1:
STR="hello"
var 2:
letter="T"
I want:
echo ${S${letter}R}
to get "hello", but instead I get bad substitution, what am I doing wrong? Thank you
STR="hello"
letter="T"
x="S${letter}R" # concat string in new variable
echo "${!x}"
Output:
hello