Hacker News new | ask | show | jobs
by enriquto 361 days ago
> I quickly jump to python instead of using Bash even for the simplest of scripts

You don't seem to respect the old, venerable, well-tested adage: "once your shell script becomes too complex, switch to a real programming language like python".

Or, the zen version (formally equivalent, but with quite a different tone): "once your program becomes sufficiently simple, turn it into a beautiful shell script".

1 comments

The true power of shell script is to coordinate programs. Once you find yourself altering data with the shell constructs, that's the sign to use $LISP instead.
> The true power of shell script is to coordinate programs. Once you find yourself altering data with the shell constructs, that's the sign to use $LISP instead.

one might awk how much logic one can bash into a script before leaving the beloved shell

if it’s structured text, especially line based format. You can get in trouble when you want maps,2+D arrays, and variable length lists