Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Bash is nowhere close for being de facto default shell for Linux. This is a bad analogy. In this case it is more like telling people that want to code Javascript to only write it in React. You got to go from something generic to something specific. Scripts written with bash will often rely on bash-specifics and can therefore only be interpreted by bash. There are entire projects dedicated to stop this plague. If you want to write portable shell scripts, use dash.

https://linux.die.net/man/1/checkbashisms https://mywiki.wooledge.org/Bashism https://wiki.ubuntu.com/DashAsBinSh https://en.wiktionary.org/wiki/bashism



> Bash is nowhere close for being de facto default shell for Linux.

Oh, yes it is. Every important distribution uses bash as the default.


Ubuntu has dash as /bin/sh.


But bash as the login shell.


Login shell means your interactive shell. It does not necessarily mean that that shell should be used for scripting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: