1

Variable value not getting printed

view story
linux-howto

http://www.unix.com – Hi, I ma trying to do this but don't know why it is not happening? Code: $r1=10   for i in "1" "2" "3" "4"; do x=`eval echo $i`; echo r${x}; done output: Code: r1 r2 r3 r4 also tried Code: for i in "1" "2" "3" "4"; do x=`eval echo $i`; echo $r${x}; done output: Code: 1 2 3 4 why I am not able to get the value of r1...Where I am geting wrong? Regards Abhinav (HowTos)