6 ms·
Ruby is often just as terse as bash, and often simpler to understand. That said I still end up using bash, awk, sed, tr etc.. and don't revert to ruby until so
by doki_pen 16y ago
Ruby is often just as terse as bash, and often simpler to understand. That said I still end up using bash, awk, sed, tr etc.. and don't revert to ruby until something gets complicated. Probably because bash is more portable.
- hernan7 16y agoThe REPL-like development style is what does it for me... I always end up having to re-write it in Haskell.
- silentbicycle 16y agoShell scripts are portable. Bash is specific to Linux, at best, and ... a bloated, hot mess. Programs that hardcode bash but only require basic bourne-shell features are a pet peeve of mine. "My favorite Linux distro has it out of the box" isn't a real standard.</bsd-porter>
- avar 16y agoYou can easily install bash on your BSD. But I get your point about writing POSIX compatible code. I'll declare a bash dependency in the shebang if I've only tested the script on bash. Requiring bash is better than having the script fail on some non-POSIX thing that I wasn't aware of. Linux distributions are getting a lot better in this department these days though, with dash being the default Debian/Ubuntu shell.