3 ms·
IMO as soon as you feel the need to create a file for your shell commands, it’s time to use another language. Bash is great for quick jobs like running ffmpeg o
by PurpleFoxy 6y ago
IMO as soon as you feel the need to create a file for your shell commands, it’s time to use another language. Bash is great for quick jobs like running ffmpeg on every file in a folder or counting the lines in a file but it sucks as a programming language.
- edgyquant 6y agoIt sucks as a programming language because it’s a shell. No I’ve written rather large scripts that were robust but had no need to be written in a programming language. If your gluing programs together shell script are literally designed for that. If you’re doing lots of arithmetic and huge amounts of variable logic then, yes, you should switch to a programming language. Each tool has its place but I’ve seen people with this attitude spend a day writing a program in python to solve a problem we could do with a couple of shell functions in half an hour.
- onlyrealcuzzo 6y ago^ and the Python script likely has many more bugs. One of the best things about gluing together battle tested Unix programs is that you'll only have bugs in your glue, not in the tricky logic that's more error prone.