I tried the following 2D array set in bash:
$ a[0,0]=a0
$ a[1,0]=a1
$ echo ${a[0,0]}
a1
I expect to get a0
, What I m missing?
I tried the following 2D array set in bash:
$ a[0,0]=a0
$ a[1,0]=a1
$ echo ${a[0,0]}
a1
I expect to get a0
, What I m missing?
Bash has no support for multi-dimensional arrays, but you can simulate 2d arrays as discussed in this answer
The answer is to add
declare -A a