[Top][All Lists]

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

Re: Compare 2 arrays.

From: Chet Ramey
Subject: Re: Compare 2 arrays.
Date: Thu, 31 May 2012 16:25:41 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 5/30/12 12:14 PM, Bill Gradwohl wrote:

> Admittedly, bash doesn't go out of its way to highlight this technique, but
> it does work.
> What say you Chet? Bug or feature? There is no middle ground.

Sure, there is.  It's not explicitly documented, so the behavior is
undefined.  You can read the documentation of indirect expansion as
allowing it.

> I believe we're quibbling over the officialness of the solution I provided
> to the poster. Obviously bash does support a way of manipulating a foreign
> array. I'd like it to be more obvious with something like a nameref as you
> suggest, but it's not there.

I'm not going to go out of my way to make it stop working, and I can't
see it not working unless I do something really dramatic to the code in
parameter_brace_expand_indir().  I plan to do something more
straightforward along the lines of namerefs in the future, but this syntax
is, as you say, useful.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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