On 10/13/22 10:42 AM, Bryan Roessler wrote:
Bash Version: 5.2
Patch Level: 2
Release Status: release
Description:
bash-5.2# declare -A a
bash-5.2# a[foo]=bar
bash-5.2# [[ -v a[@] ]]; echo $?
1
From CHANGES:
j. Associative array assignment and certain instances of referencing (e.g.,
`test -v') now allow `@' and `*' to be used as keys.
There are other ways to test whether or not an associative array has any
set elements, but there was no way to use `*' or `@' as a key in previous
versions.
There was a long discussion about this back in early 2021. Some of the
relevant messages about `@' and `*' keys start here:
https://lists.gnu.org/archive/html/bug-bash/2021-04/msg00058.html
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/