ksh associate arrays
associative-array, ksh
Solution
The ksh `typeset` command is used to declare an associative array.
$ typeset -A age
$ age[bob]=42
$ age[alice]=31
$ print ${age[bob]}
42
Problem
I have a script that needs to use associative arrays. Being new to `ksh`, I am unable to find anywhere that `ksh` supports associative arrays. When I try to use regular array syntax and assign, I get an error that index cannot be that big. Does `ksh` support associative arrays? If not, what is the alternative solution? I need to do the following: ``` ${array[$name]}=value ``` and later in the code, to read a value for ``` ${array[$name]} ``` I have about 2000 values to be stored and read from the array every time this script runs. Unfortunately, I cannot use `perl` due to the extent of legacy modules to be included inside the script. Appreciate any help, tips or techniques.