There's got to be an easier way to do this, but not remembering or finding
it:

First tried the obvious:
declare -a ar1=([0]="1" [1]="2" [2]="3" [3]="44")
an=ar1
echo ${#!an[@]}
-bash: ${#!an[@]}: bad substitution

This works but feels kludgy

an=ar1
eval echo \${#$an[@]}
4

----
I thought the !name was supposed to take the place
of using $an, but haven't seen a case where !an works where
an points to an array name.

Is there a place in the bash manpage that gives an example of using !name
where name points to an array?

Thanks...
-l



Reply via email to