You’ll need to use an associative array, declare -A FUNCTION
BUT associative arrays are not a sh
feature: declare -A
is bash syntax. Change your #!
line.
You’ll also need bash version 4.0 or greater: the default /bin/bash on MacOSX is too old.
You can also find associative arrays in ksh and zsh.
CLICK HERE to find out more related problems solutions.