On Wed, Nov 25, 2020 at 02:48:44PM +0100, Frans de Boer wrote:
> Addressing associative arrays with an array statement - like echo
> ${k["${a[x]}"] does not work.
That seems to work for me, after I fix your quoting. Using your example
variables:
unicorn:~$ declare -A k
unicorn:~$ declare -a a
LS,
Unless I have not read the manual properly, bash has an issue with the
key part used to address a value within associated arrays. I tried this
in the bash 4.4.x and 5.x series of bash under OpenSUSE 15.2 and TW.
Addressing associative arrays with an array statement - like echo
${k["${a[x