The following bash script prints out c, but I'm not sure why.
a=b
b=c
echo ${!a}
I believe that !a will be converted to the last command which began with a, so in this case that would be a=b. This should mean that the last command is equivalent to the following.
echo ${a=b}
However, that prints b, not c. Is anyone able to explain why this is the case?