I try to iterate over an associative array in Bash.
It seems to be simple, but the loop doesn\'t follow the initial order of the array.
Here is a simple scri
My approach is to create a sorted array of keys first:
keys=( $( echo ${!dict[@]} | tr ' ' $'\n' | sort ) ) for k in ${keys[@]}; do echo "$k=${dict[$k]}" done