[External] : configure shell game
Jan Pechanec
Jan.Pechanec at oracle.com
Wed Jun 3 01:11:44 AEST 2026
Hi Darren,
On Tue, Jun 02, 2026 at 11:28:07PM +1000, Darren Tucker via openssh-unix-dev wrote:
> Hi.
>
> I was recently reminded of this nonsense from the Solaris /bin/sh while
> running a regression test:
>
> run test proxy-connect.sh ...
> [...]/proxy-connect.sh: warning: line 6: `...` obsolete, use $(...)
> [...]/proxy-connect.sh: warning: line 6: `...` obsolete, use $(...)
> [...]/proxy-connect.sh: warning: line 15: `...` obsolete, use $(...)
not much important but might be interesting to add some details.
/bin/sh on Solaris 11+ is ksh93 which considers ``, and documents it in
its man page, as obsolete. Retrospectively, using ksh93 as /bin/sh was
not a good decision but it would be close to imposible to change it now.
We seriously considered that but as it would likely break large amount
of existing user scripts using ksh93 features without explicitly calling
/bin/ksh in the shebang, we decided against that.
ksh93 issues the warning with the -n option, which is used in
test-exec.sh. And it does not distinguish between syntax errors and
warnings.
if $TEST_SHELL -n $SCRIPT; then
true
else
echo "syntax error in $SCRIPT"
exit 2
fi
Regards,
Jan
--
Jan Pechanec <jan.pechanec at oracle.com>
More information about the openssh-unix-dev
mailing list