I've this script: an array of array, and a loop. Inside the loop, how can I print the key (foo) and the value (bar)???
#!/bin/bash
declare -A combo=()
combo+=(['foo']='bar')
combo+=(['hello']='world')
for window in ${combo[@]};
do
echo ???
echo ???
done
exit
expected output:
key: foo value: bar
key: hello value:world
I'll read this bash manual asap!!
combowill have one array element that isbarworlddeclare -A. If they did this would do what they expected. So a more constructive version of your comment here (and on the posted answer) would likely have been more useful.