Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


On 2010-12-02 at 08:44, <eagles051387@gmail.com> wrote:
what is the difference between using /bin/sh and /bin/bash?

It's morning, so I feel like rambling:

/bin/bash, if it exists, presumably can always be assumed to be Bash, the GNU "Bourne-Again" Shell. 
Hopefully some relatively recent version of it. 

On some Unixes, Bash is not always included in a normal installation, but any machine intended for 
serious development probably has it installed anyway, in best cases from some official or 
semi-official Unix version specific add-on repository. But not necessarily as /bin/bash.

When I administered and used HP-UX and Solaris machines in the 1990--2005 timeframe I used to have 
the Bash that I had built myself installed as /opt/gnu/bin/bash. Nowadays, the semi-official 
location of Bash in Solaris is /usr/sfw/bin/bash, I think.

In other Unixes Bash might have some other semi-official location. On some of the BSDs it is 
/usr/local/bin/bash I think. Etc.

Note that Bash is *required* to build LibreOffice. (A requirement inherited from OOo.) That is not 
going to change. But we are trying hard to avoid requiring Bash to be installed as /bin/bash.

As for /bin/sh, the only thing one can say for sure is that it is some kind of Bourne style shell. 
It used to be that one could not even be sure that it was a POSIX compliant shell. For instance on 
Solaris, back when I used it heavily, it wasn't. A POSIX compliant shell was /usr/xpg4/bin/sh, if I 
recall correctly. But I hope that by now one can be fairly sure that /bin/sh is a POSIX compliant 
shell, or at least that we don't require any features in /bin/sh that some platform we support 
doesn't offer in it.

On some Linux distros /bin/sh might just be the same Bash that is also available as /bin/bash. But 
not all.

I fully understand that Linux is all that what many of you care for... but as far as I know, we 
want LibreOffice to be portable to any serious current desktop Unix OS. No matter how irrelevant 
some parts of the "community" might think that Unix is, "market share" -wise. So we need to take 
these things into consideration.

Hope this helps, have a nice day.

--tml


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.