Hacker News new | ask | show | jobs
by mhurron 4281 days ago
> in a sane environment /bin/sh should not be bash

Why, other than it is not the shell of the day?

1 comments

First it encourages people to use bash specific stuff that is non Posix. Second it is a huge bloated bit of code thats ok as user interface, but scripts should use something that is more minimal. To avoid this sort of issue.
> scripts should use something that is more minimal. To avoid this sort of issue.

Are you also against Perl and Python or does this scripts should be minimal only apply to bash?

> First it encourages people to use bash specific stuff that is non Posix

That's not a problem for most people.

These are reasons you don't like bash, not reasons to not use bash.

/bin/sh is the shell called by system(3) and used by portable scripts bundled with packages. Those things can't use anything but standard sh anyway, so having them run bash is overkill. "Don't use bash as your /bin/sh" isn't the same as "don't use bash as your interactive shell" or "don't write bash scripts"