BASH : Fake two dimensional array -


i have array simulate 2 dimensional array

        #oc possibles values             #d         ocpossiblevalue0[0]=1         ocpossiblevalue0[1]=2         ocpossiblevalue0[2]=5         ocpossiblevalue0[3]=10         ocpossiblevalue0[4]=15         ocpossiblevalue0[5]=20         ocpossiblevalue0[6]=30         ocpossiblevalue0[6]=200                #t         ocpossiblevalue1[0]=0         ocpossiblevalue1[1]=5         ocpossiblevalue1[2]=10 

if have index $i , $j, want is

ocpossiblevalue$i[$j] access it

however, $i not considered number text string

i think follows:

arr=ocpossiblevalue$i[$j] echo ${!arr} 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -