On Sat, Aug 13, 2011 at 6:41 PM, Linda Walsh <b...@tlinx.org> wrote: > > > > I want to have an array of 'names'. > > given a name, "X", I had a prefix, _p_, so have _p_X, > I want to access / manipulate it as an array. > > so given I pass in a name in a var, I have to use 'indirect' syntax: > > ${!name} > > But that doesn't seem to play well with array syntax: > > ${#${!name}[*]} > bash: ${#${!name}[*]}: bad substitution > > What syntax would I use for this? > > > >
Please read BashFAQ/006: http://mywiki.wooledge.org/BashFAQ/006 -- Visit serverfault.com to get your system administration questions answered.