I saw lots of article on this. The most useful for me was this one
How to declare 2D array in bash
the answer seems really useful since he got 20 likes. However I can't see what I do different (except my array isn't set in a loop)
matrix[0,0]=2
matrix[0,1]=1
matrix[1,0]=9
matrix[1,1]=8
matrix[1,2]=7
echo ${matrix[0,0]}
echo ${matrix[0,1]}
echo ${matrix[1,0]}
echo ${matrix[1,1]}
echo ${matrix[1,2]}
I get 9 8 9 8 7