here is a sample code
astr[10]=a
astr[20]=b
astr[30]=b
astrR="astr[@]"
echo ${!astr[@]} #the indexes
echo ${!astrR} #the values
#FAIL: echo ${!!astrR}
astrR="!astr[@]" # wild guess
echo ${!astrR} # empty output, so I am still wild
So, how to get the indexes using astrR ?