"The bash man page has long had the following bug listed: "It's
too big and too slow" (at the very bottom of the man page). If you
agree with that, then you probably won't want to read about the
"new" associative arrays that were added in version 4.0 of bash. On
the other hand, if you've ever used any modern Office Suite and
seen code-bloat at its finest and just think the bash folks are
exaggerating a bit, then read on.
"There's nothing too surprising about associative arrays in
bash, they are as you probably expect:
declare -A aa
"The -A option declares aa to be an associative array.
Assignments are then made by putting the "key" inside the square
brackets rather than an array index. You can also assign multiple
items at once:"
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.