I come across the problems when assigning the array in the script below . How to use the array with the 'string index' correctly ? When I assign a new string index , the array elements that are previously assigned are all changed .
$ array[aa]=211
$ echo ${array[aa]}
211
$ array[bb]=333
$ echo ${array[bb]}
333
$ echo ${array[aa]}
333
$ array[cc]=999
echo ${array[cc]}
999
$ echo ${array[bb]}
999
$ echo ${array[aa]}
999