I have a question about expanding shell variables. Given the following piece of script:
a="Some text"
b="Other text"
for i in a b
do
string1=$i
echo $string1 --> returns 'a'
string2=EXPRESSION\_WITH_$i
echo $string2 --> returns 'Some text'
done
What do I have to fill in for the text EXPRESSION_WITH_$i? So I would like to expand $i (equals to 'a') to $a
Thanks for your reply!
Ronald