I have an array:$ arr=(one two)I want to access it's content through another variable which contains the name of the array:$ arrname=arrI want to access (one two) using the variable arrname. I tried dereferencing it:$ echo ${!arrname}one$ echo ${!arrname[@]}0But it does not work as I expected it to. How can I access the content of the array arr do that?
Dereferencing array
bash;array