Howto retrieve value of variable within variable
Hello All ,
Problem Description A1=Hello A2=World A3 . . and so on I want to print Values of All A1,A2 for (( i=0; i < 10; i++ )) VAR = A$i; do echo $(A$i); // echo $($VAR); done is not working. Can Any one help me in retrieving value of variable within variable Thanks & Regards Tushar Sharma |
you need to use eval, but first see here: http://www.linuxquestions.org/questi...al-4175426547/
Code:
for (( i=0; i < 10; i++ )) |
Quote:
Also I was able to do same with help of associative array in shell script. Thanks & Regards Tushar Sharma |
All times are GMT -5. The time now is 08:29 PM. |