how to make bash replace the value of a variable?
Hi,
I have a program I am writing where I have a for loop and I want to make it substitute the variable twice like:
for ((i=0;i<5;i++)) do
echo $"$i"
done
I wanted it to replace $i with a value, and then echo the value of the variable named from that output. How can you tell bash to do a double substitution?
Like:
echo $"$i"
echo $3
echo [text from $3]
Thanks,
rabbit2345
|