I am trying to do an indirect reference to values in an array in bash.
anotherArray=(\"foo\" \"faa\") foo=(\"bar\" \"baz\") faa=(\"test1\" \"test2\") for
You need do it in two steps
$ for i in ${anotherArray[@]}; do t1=$i[0]; t2=$i[1]; echo ${!t1} ${!t2}; done bar baz test1 test2