linux - How to get the size of the second dimension of two dimensional arrays in bash? -


if have

arr[0,0]=0; arr[0,1]=1; 

and try

echo ${#arr[0,@]} 

i got

bash: 0,@: syntax error: operand expected (error token "@") 

what correct way size of second dimension or arr?

multi-dimensional arrays not supported in bash.
nevertheless, simulate them using various techniques.

the following definitions same:

  • arr[1,10]=anything
  • arr["1,10"]=anything

both evaluated arr[10]=anything (thanks chepner):

echo ${arr[10]} 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -