News for hackers. Stuff that matters.
Re:Something about functions in Bash (2017) by gkya on Thursday July 05, 2018 @09:58PM (#17468369)
I have multiple ~10 line POSIX shell scripts in my dotfiles. I also have a bunch each of Perl and Python ones [1]. I'd rather not rewrite my shell scripts with neither of that languages, or Ruby (which I like and use a bit).

When scripting, I find general-purpose languages are better when you have structured data (i.e. some JSON coming in) or you want to use libraries, and shell scripting better when you're wiring up multiple programs to work together, or starting up a program after setting up the environment for it.

IIRC, the FreeBSD sh(1) man page was a good entry to writing POSIX compliant, thus quite portable shell scripts.

[1] Compare the ones here: https://github.com/cadadr/configuration/tree/master/bin

There are no comments on this comment yet.