|
| From: | L A Walsh |
| Subject: | Re: Changing the way bash expands associative array subscripts |
| Date: | Tue, 13 Apr 2021 15:36:50 -0700 |
| User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
On 2021/04/06 08:52, Greg Wooledge wrote:
In that case, I have no qualms about proposing that unset 'a[@]' and unset 'a[*]' be changed to remove only the array element whose key is '@' or '*', respectively, and screw backward compatibility. The current behavior is pointless and is nothing but a surprise landmine. Anyone relying on the current behavior will just have to change their script.
----
So echo ${a[@]} = expansion of all, but
unset a[@] would only delete 1 element w/key '@'....
how do I echo 1 element with key '@'
Creating arbitrary definitions of behavior for the similar syntax
seems like a sign of random feature-ism.
| [Prev in Thread] | Current Thread | [Next in Thread] |