bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: currently doable? Indirect notation used w/a hash


From: Greg Wooledge
Subject: Re: currently doable? Indirect notation used w/a hash
Date: Mon, 17 Jun 2013 07:57:33 -0400
User-agent: Mutt/1.4.2.3i

On Sat, Jun 15, 2013 at 12:36:22PM -0700, Linda Walsh wrote:
> John Kearney wrote:
> >There is also a backdoor approach that I don't really advise.
> >val="${ArrayName}[Index]"
> >echo "${!val}"
> -----
>       Don't advise?  Any particular reason?  or stylistic?

I'd shared this advice ("don't use it"), because I cannot for the
life of me tell whether this is a bug or a feature.  As near as I
can tell, it is an unforeseen consequence of the parser implementation,
not documented anywhere.  As such, I would not rely on it to continue
working in future Bash releases.

P.S. you meant printf -v, not -V.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]