I want to name variable as a_${v}
.
for example : v can be 2013 2014
I am now declaring a variable to a_${v}
a_${v}=hI # a_2013 should be Hi
v=2014
so a_${v}=Hello # a_2014
should be Hello
I tried using eval command though it is not throwing error while assigning a value but I am not able to extract the value of variable name
$ v=2013
$ eval a_${v}=Hi
$ v=2014
$ eval a_${v}=Hello
echo ${a_${v}}
is not working.. :(
I am using bash and I don't want to change the variable name i.e dn't want to assign the value to another value