4 ms·
Here's what my take on the script would be in bash (albeit untested): https://gist.github.com/binaryphile/3cf01870516d5fffafbc84a054540160 https://gist.github.
by binaryphile 9y ago
Here's what my take on the script would be in bash (albeit untested):
https://gist.github.com/binaryphile/3cf01870516d5fffafbc84a054540160 https://gist.github.com/binaryphile/3cf01870516d5fffafbc84a0...
Whoever wrote the initial bash script was clearly in a rush. I don't hold that against anyone, but it makes it poor fodder for an example of why bash is "bad". In particular, for the kind of task illustrated, it's a far better choice than python and I say that as a (formerly) unabashed pythonista.
It takes some time to get chops in bash, especially since there's no culture of developing shareable libraries, but it's no harder to learn bash via stackoverflow/google searches than it is to learn python. Use python when you need data structures and objects. Use bash to automate what you would normally do on the command line. Is that so hard?