help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Unsetting members of associative arrays


From: Greg Wooledge
Subject: Re: [Help-bash] Unsetting members of associative arrays
Date: Fri, 12 Apr 2019 08:18:19 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Apr 11, 2019 at 07:16:59PM -0400, Douglas Lewan wrote:
> >> The following code doesn't do what I expect. The ostensibly unset array
> >> element is still there.

> Well, as with so many things Linux, once something has been threatened,
> it becomes irreproducible. Now every variant I can think of on the above
> code acts the way I want.

Another possible cause is that you accidentally ran your unset inside
a subshell, either because your loop is part of a pipeline, or because
it's part of a function that you called inside $(...), or several other
possible reasons.

Without seeing the failing code, it's impossible to be sure.



reply via email to

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