Bash-like scripting in shells is prevalent in operating systems but I don’t understand why, when it doesn’t have the syntax to make programming easy like other languages. What features does bash have that make it so suitable for shells? Why even new operating systems like Redox OS choose a very similar syntax over a completely different programming language?
It’s here, it’s there, it’s everywhere. The problem with replacing things that work with something “better” is that “better” is subjective, so you end up with a new “better” way every few years, and maintaining existing systems becomes a god awful slog. See the JavaScript ecosystem.
The bash I wrote 10 years ago still works today, and it will still work in 10 more years. The same bash will very likely work on your computer, on a remote server, etc. This is the power of not chasing “better” all the time.
Try running a Ruby or Node program from 10 years ago today on your computer. Now, try running it on a random Linux server.
Please do not take this as a slight against Ruby or Node, or any other high level programming language. Bash compared to those is simply apples and oranges, they are not the same thing.
By all means, if you have a project that requires a Ruby runtime anyway, write operational scripts with Ruby, run them with Rake, etc.
Want a portable script that doesn’t depend on a complex runtime? Use bash.
If bash is too limiting, use Perl. No, seriously. Perl is fine. It is about as ubiquitously available as bash, and the standard library likely has what you need to get the job done. People blindly dismiss Perl because some blog post told them to, usually in the context of writing application code. You’re not writing application code, you’re writing scripts. Would you write an application with bash? No.