If I wanted to pass the keys and values of an associative array in bash separately, and used something like
./foo.py -k "${!args[@]}" -v "${args[@]}"
would they come out in the same order? I don't really care what other the k=v pairs are stored in, but I do need to know if I could count on the keys and values coming out such that the 3rd item in the key array is in fact the key for the 3rd item in the value array.
I know that associative arrays are "unordered" and that whatever order you add them to the array is irrelevant to how they're output, but I'm wondering if the underlying storage behavior means they will always output in the same order.
array get namecan return a different list each time it is called ifnameis not modified at all between calls?