Expanding shell variable

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

Hi, if I understood wel what you asked, here's an example:

# aaa=123
# BBB=aaa
# echo ${BBB}
aaa
# echo ${!BBB}
123

Hi Ynir,
This was exactly what I meant. Thx!