[msg(shbot)] # foo() { declare -a foo=( "$@" ) ; declare i=-1 ; declare -p
foo ; declare -n next=foo[++i]
now=foo[i] ; while [[ -v next ]] ; do : $now ; done ; printf -- $i ; } ;
foo '' 1 2 3
[shbot([email protected])] declare -a foo=([0]="" [1]="1" [2]="2" [3]="3")
[shbot([email protected])] -1any way to make it work ? i think i remember that it used to work at least once for me ..
