Mailinglist Archive: opensuse-factory (401 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
On Wed, 13 Mar 2019 11:20:28 +0100
Joerg Schilling <Joerg.Schilling@xxxxxxxxxxxxxxxxxxx> wrote:

Martin Wilck <mwilck@xxxxxxxx> wrote:

can be tested for compliance. After this change, we have the opposite.
/bin/sh is now a black box that behaves "posix compliant"
in some weakly defined way. Scripts may work, or they may not - no
reliable way to find out.

I doubt that.

Currently, you have some obscure "wisdom" that there is something called
"bash"
where nobody is able to tell what features that covers since there is more
than
one single release of bash.

If you however write POSIX compliant scripts, you have the grant that in case
there is a problem, you can file a bug against the installed shell.

Just as POSIX is a description of disparate implementations with
various issues and the standard is updated over time as well.

Bash has documentation. If implementation does not match documentation
you can file a bug as much as you can against a POSIX-compliant shell.
With bash being much more active project than most POSIX-compliant
shells the bug is even much more likely to get resolved. And unlike
POSIX-compliant shells bash has BASH_VERSION which tells you *exactly*
what you are getting in case you need to support multiple versions that
behave differently.

So from compatibility and reliability standpoint bash is clear win if
you are in control of the shell used. And that is our case so long as
we do not implement alternatives for /bin/sh.

Thanks

Michal
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups