Seb dixit:
>[ ${x#X} = $y ] || echo "BUG the 2nd!"
I think this must be … = "$y" to be fair. But that was not the problem.
>And here are the results you get running it with different shells:
tg@blau:~ $ mksh debug.sh a b c
3
2
1
tg@blau:~ $ mksh -c 'print $KSH_VERSION'
@(#)MIRBSD KSH R48 2013/11/17
Fixed in CVS HEAD now.
bye,
//mirabilos
--
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)