[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unsetting associative array executes commands
From: |
Andreas Schwab |
Subject: |
Re: unsetting associative array executes commands |
Date: |
Thu, 11 Mar 2021 21:50:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1.91 (gnu/linux) |
On Mär 11 2021, Chet Ramey wrote:
> $ cat x1
> declare -A blah
> blah['$(DOESNOTEXIST)']=broken
> shopt -s assoc_expand_once
touch blah\$
> for i in "${!blah[@]}"; do unset blah["$i"]; done
> declare -p blah
> $ ../bash-5.1-patched/bash ./x1
> declare -A blah=()
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."