News for hackers. Stuff that matters.
Re:When Bash scripts bite by growse on Friday May 12, 2017 @05:46AM (#14322588)
I agree that for the simple job of "start process, maybe echo some stuff", then bash is superior to python. However, my difficulty always arises the moment you want to start writing 'if', or handle some sort of error condition.

Once you go down that road, you're into magic switches at the top of your script (which TFA demonstrates aren't well understood), and subtle control issues where bash's flow control doesn't quite do what you think it should, and (for me) this is where bash stops being superior.

Re:When Bash scripts bite by arghwhat on Friday May 12, 2017 @06:19AM (#14322731)
I don't think flow control is a problem, as long as it's just to complete a simple purpose. Checking if a file is present, running some code for every file or every line, etc.

But bash is definitely not something where complicated logic belongs.