However, having written hundreds of lines of bash gluing systems together for various CI jobs and automations, at some point you need to stop writing bash and switch to something with a richer data model and easier to maintain/test.
However, having written hundreds of lines of bash gluing systems together for various CI jobs and automations, at some point you need to stop writing bash and switch to something with a richer data model and easier to maintain/test.
Bash/shell is great once you realize it's a glue language. You avoid doing anything but pipelines, and if theres no command/tool to do something, you can write that in other language and include it in the pipeline.
More thoughts on this: https://blog.habets.se/2021/06/The-uselessness-of-bash.html
Another piece of evidence is that I do many many code reviews. Not once have I reviewed bash script changes that did not have subtle bugs that would bite us in real life. Not once!
If I'm using bash, I just need to glue a few tools together and I've most likely decided already that concurrency more complex than simple wait(1p) is unnecessary, and that fine-grained error handling is unimportant.
If I really cared about those things, I'd probably use something like Haskell that actually improves on error handling, unlike Go, or if I'm scripting something for a specific software project, whatever that project's language is.
But sure, my choice is Go. You do haskell if it's best for you.
NodeJS and Python could be contenders but Bash has them beat in longevity.
If I’m just writing small tools that wire a few basic commands together bash is fine. For anything that actually needs data to be crunched or decent error handling Python, Go, Perl (though also cryptic), C++ are, IMO, a far better choice.
I did recently have a case where I needed to run a shell command with a multi-line output, and an easy call to os.popen() wasn't returning the full output. So, back to Bash arrays and weird text parsing syntax (IFS=" " read tempArray...) I went...
It's usually meant as "raises the question", but language lawyers insist it means what the wiki page said.
But this is neither of those two. And if you're the only one who uses a phrase a certain way, and it means other things to everyone else, then that's actually wrong, even in a descriptive language.