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

Installing ruby/predicting the version of ruby installed/writing ruby that can run on any version installed... is unfortunately non-trivial.

I think pretty much the only reason people write bash is because you have an incredibly high chance of bash being installed and a version of bash being installed that will run whatever bash you write just fine.

Perl is honestly almost as reliable to be there predictably and compatibly... but I guess people would rather write bash than Perl?



Is there any risk of Bash ever going away? It seems like it's the de facto shell. I remember considering whether or not I should learn Perl at one point. It didn't even feel like a choice with Bash. Trendy shells seem like they have no choice but to support it too.

I feel like what usually makes me reach for something beyond Bash is really a matter of wanting or needing some dependency that wasn't written in it for whatever reason. Usually this happens right at the point where the script/utility starts to turn into a library/program, so it's trivial to just transpose the control flow into whatever language is required at that point and go from there. This of course raises the type of concern you mentioned about Ruby, but at that point it's hopefully worth the trouble to address.


The only “danger” to bash is if zsh completely overtakes it - and even then scripts will probably be written in bash-compatible zsh.


bash is no longer the default shell on macOS


Bash might be consistent, but what about the programs you're calling out to? Even basic utilities have different options between BSD and GNU Coreutils. Something like git might not have options you're expecting due to differences between versions. Or if you need to download a file using HTTP, you will run into a problem when you run on a machine that has wget when your script was expecting cURL.

And yes, you have these sorts of problems with other languages, but my point here is that Bash doesn't free you from them.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: