On Mon, Aug 15, 2011 at 2:31 AM, Linda Walsh <b...@tlinx.org> wrote: > > > Re: BashFAQ/006: http://mywiki.wooledge.org/BashFAQ/006 > Pierre Gaston wrote: >> >> Linda: >> >> >>> >>> please show quote the section >>> that shows using an variable that holds the name of an array to be used >>> (and assigned to).... else ... >>> >> >> The proof is in the faq, you could have found it if you were not busy >> trolling the list. >> >> > > ==== > Guess this was not possible. > The FAQ covers indirect, > it covers arrays, > but I see no place where it covers the combination. > If you see such, then quote it. Don't just wave your arms around > making unsubstantiated claims or accusations. > > I didn't ask for the impossible -- just a quote. > > Apparently that was too much to ask for, so you call me a troll....ya, > right. > Who's the troll? >
# Bash -- trick #1. Seems to work in bash 2 and up. realarray=(...) ref=realarray; index=2 tmp="$ref[$index]" echo "${!tmp}" # gives array element [2]