DEV Community

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

Collapse
 
palexdev profile image
Alessadro Parisi • Edited

This.
I have a Java project and I needed some scripts to update and process some resources. Since I wanted them to be executable on any OS I made these choices:
1) the tools responsible for the update/processing come from npm and they are cli tools
2) the scripts had to be written in bash because it was the only one language I could execute on any OS (given than on Windows I need the Git shell anyway)

It was a nightmare. Loops and conditions are so counterintuitive sometimes, and let's not talk about variables...
I ended up rewriting them in Groovy, while still using npm cli tools though