Skip to main content

All Questions

1 vote
1 answer
2k views

How to retrieve items from an array of arrays?

Hello StackExchange pros! I am working on a zsh project for macOS. I used typeset to create three associative arrays to hold values, and a fourth array to reference the individual arrays. Is it ...
jamesrg71's user avatar
4 votes
1 answer
491 views

Indirect parameter expansion in associative array

Following this answer, I want to apply the approach on my script. The basics of it is: foo="bar" baz="foo" echo "${!baz}" bar I want to provide translated strings, like ...
schrodingerscatcuriosity's user avatar
10 votes
1 answer
5k views

Pass associative array as parameter list to script

In a script I have an associative array like: declare -A VARS=( ["key1"]="value1" ["key2"]="value" ) Is there a single command to transform that into a parameter list in the form --key1=value1 --...
Matteo Tassinari's user avatar