List = 1 2 3 4 5 for i in $LIST do sum=`expr $l_$i + $b` done
l_5 are variables having some values.
when I am trying to access those values within the for loop using loop variable
i, the value of i is getting substituted in the expression i.e the statement
(1 + $b) is getting executed instead of
($l_1 + $b). I have tried various combinations of
$ symbol and also used paranthesis but nothing seems to be working.