If I want a BASH 2D array, is there any recommended way of doing this for say, a N x M arrangement? On several occasions, I've had to define array1, array2, arrayN each of M elements in conjunction with case statements - but this is very clumsy.
I realise it would be possible to define a single big array X and compute a 1-1 map between X[something] and the [i,j] element - but this seems like a lot of work to do it properly.
Does there exist any set of functions which could do this reasonably efficiently? I realise its a bit like making BASH imitate FORTRAN.