See following example:
$ ksh --version
version sh (AT&T Research) 93u 2011-02-08
$ cat foo.ksh
typeset -a arr=( 0 1 2 3 4 )
for v in "${arr[@]:5}"; do
echo 1. You should not see this.
done
for v in "${arr[@]:1:0}"; do
echo 2. You should not see this.
done
for v in "${arr[@]:0:-1}"; do
echo 3. You should not see this.
done
$ ksh foo.ksh
2. You should not see this.
3. You should not see this.
$
Here "${arr[@]:5}" expands to nothing which makes sense. But
"${arr[@]:1:0}" and "${arr[@]:0:-1}" should be handled in the same way.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users