Supported by bash 4.0+ Use strings rather than integers as array indexes.
declare -A colors
colors["red"]="#ff0000"
colors["green"]="#00ff00"
colors["blue"]="#0000ff"
echo ${colors["blue"]}
Supported by bash 4.0+ Use strings rather than integers as array indexes.
declare -A colors
colors["red"]="#ff0000"
colors["green"]="#00ff00"
colors["blue"]="#0000ff"
echo ${colors["blue"]}