Você pode usar o parâmetro indireto ${!parameter} , ou seja, no seu caso, ${!a} :
$ foo1=abc
$ i=1
$ a="foo${i}"
$ echo "${!a}"
abc
Da seção "Expansão de parâmetro" de man bash :
${parameter}
.......
If the first character of parameter is an exclamation point (!), it introduces a level of variable indirection. Bash uses the value of the variable formed from the rest of parameter as the name of the variable; this variable is then expanded and that value is used in the rest of the substitution, rather than the value of parameter itself.