|
|
|
|
|
by mixedmath
512 days ago
|
|
I'm confronted with a similar problem frequently. I have a growing bash script and it's slowly growing in complexity. Once bash scripts become sufficiently long, I find editing them later to be very annoying. So instead, at some point I change the language entirely and write a utility in python/lua/c/whatever other language I want. As time goes on, my limit for "sufficient complexity" to justify leaving bash and using something like python has dropped radically. Now I follow the rule that as soon as I do something "nontrivial", it should be in a scripting language. As a side-effect, my bash scripting skills are worse than they once were. And now the scope of what I consider "trivial" is shrinking! |
|
Also, using a better shell language can be a huge productivity (and maintenance and sanity) boon, making it much less “write once, read never”. Here’s a repo where I have a mix of fish-shell scripts with some converted to rust scripts [1].
[0]: https://neosmart.net/blog/self-compiling-rust-code/
[1]: https://github.com/mqudsi/ffutils