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

    > or, in the case of macOS a horribly outdated one.
The latest version of macOS defaults to zsh instead of the outdated version of bash.


Doesn't matter when shebang is #!/bin/bash


That's just for the login shell. It still ships with /bin/bash, and /bin/sh still by default invokes bash (in sh compatibility mode). However there is a systemwide flag you can set to make /bin/sh run dash or zsh instead.


That's mostly irrelevant, since basically no one writes shell code in zsh and this is unlikely to change that.


That's probably going to change with macs having it as the default.

Never underestimate the power of "Well, it worked on my machine"

People seem to be willing to do apt-gets (or equivalent) in docker files, I could see several of my old co-workers doing that just to get a script working.


Unlikely. Apple have made the default interactive shell zsh, but /bin/bash still stays around and I believe /bin/sh still aliases to it by default. Meanwhile there is an enormous ecosystems of shell scripts including countless curl ... | bash installers which no one has any motivation to port to some shell which is not installed by default on most Linux distros. Although Microsoft would undoubtedly be delighted with Apple accelerating the move of developers to Windows as the Unix of choice, I'm not convinced even Apple's current management is going to be dumb enough to remove bash altogether.




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

Search: