Is it possible in bash to compose a variable name from some other variable and then ask if a variable whose name is the value of that variable is defined?
a=foo
b=f_$a
if [ -n "${$b}" ]
where I am looking for a variable of name f_foo. I thought something like ${$b} might do it but that gives bad substitution