I wanted a hashmap equivalent in bash (keys as string
and values as a list
of integers). So, I wrote the following code-
declare -A PUBS
PUBS=( "FEE":"[345, 342]" "FOO":"[1, 2, 44]" "BAR":"[23, 67]" )
However, I get an error saying must use subscript when assigning associative array
.
What's wrong here?