In bash version 4, associative arrays were introduced.
declare -A arr arr["key1"]=val1 arr+=( ["key2"]=val2 ["key3"]=val3 )
The arr array now contains three pairs of key values. bash is pretty limited what you can do with them, but not sort or pop up, etc.
for key in ${!arr[@]}; do echo ${key} ${arr[${key}]} done
Flip all the key values ββand send them.
peteches Jan 17 '13 at 1:54 2013-01-17 01:54
source share