News for hackers. Stuff that matters.
Re:Pure Bash Bible by cfors on Thursday September 19, 2019 @09:20AM (#21015862)
My disclaimer is that I love bash. I write way too many things in bash. But eventually I go back and refactor the scripts into Python (or lately, Go) because I am so sick of people refusing to touch my bash scripts.

String munging in Python is so much objectively easier to read than bash. I would say that it's because it is similar to a lot of the more popular languages than the sort of cryptic parameter substitution bash provides. And if that makes it easier to maintain some automation, then its worth the effort just to use Python IMO.

Re:Pure Bash Bible by fsaintjacques on Thursday September 19, 2019 @10:19AM (#21016396)
Python is a portability minefield. I'll spend more time trying to get the script/package run than reading the bash script.
Re:Pure Bash Bible by cfors on Thursday September 19, 2019 @10:27AM (#21016489)
Couldn't agree more, but honestly I think that is a completely overplayed issue. Just be explicit (This requires Python3.7) and have a requirements.txt file, maybe bundle with a `make install` command and move on.

If people can't figure that out... I don't know how you're going to expect them to read a cryptic bash script.

Don't get me wrong there is totally some good use cases for bash. Init-scripts come to mind when you don't want to lug around a Python VM in a lightweight container, for example.