oksh
oksh copied to clipboard
`shift $#` inside for loop without `in word...` part breaks the parameter list
To reproduce, put the following into a file (say, foo
),
for x; do
shift $#
echo $x
done
and run:
$ oksh ./foo x y z
x
y
./foo
No other shell does this except mksh.
Thank for the report. This is one where I'll ask you to please confirm that the behavior is the same with the in-base ksh on OpenBSD (I suspect it is) and send an email to their bugs@ list. And I'll merge the fix from there.