DEV Community

Discussion on: Bash is a terrible as a programming language, but what's the alternative ?

Collapse
 
moopet profile image
Ben Sinclair

I kind of agree, in that I think if there's anything you need to code more than a very simple for loop then you would be better off using any available scripting language.

Having said that, I write a lot of shell scripts. I try to make them POSIX if at all possible, and that's kind of my cut-off point for choosing a different language. If you need to use a bash extension for arithmetic then either fall back on bc or make the jump to Python or whatever.

... but there's no point in using Python if the majority of what you're doing could be accomplished by calling grep in a subshell.