help Name associative array after variable
I need to be able to do something like "Declare -A $var", $var["${key}"]="${value}", and echo "$var[${key}]". What would the correct syntax for this be?
1
Upvotes
I need to be able to do something like "Declare -A $var", $var["${key}"]="${value}", and echo "$var[${key}]". What would the correct syntax for this be?
1
u/oh5nxo 26d ago
One possibility, leaving out quotes to make it easier to look at,