3 ms·
More importantly, it doesn't matter that there are many kinds of tasks that shell scripts aren't good at. It matters that there are tasks that shell scripts are
by naniwaduni 7y ago
More importantly, it doesn't matter that there are many kinds of tasks that shell scripts aren't good at. It matters that there are tasks that shell scripts are good at, and indeed better suited to than any popular general-purpose language.
When you have a pipeline between two nontrivial programs, for example, or any kind of fd manipulation.
- DonHopkins 7y agoYet the problem remains that bash scripts are NOT actually good for what they're designed for: dealing with file names. Because some file names have spaces in them, and some file names begin with hyphens, and so many careless bash programmers don't give a shit, and would rather blame their audacious uncontrollable users for daring to put spaces or hyphens in their file names, than write scripts that don't suddenly and inexplicably crash, years after they're written and the programmer has long since left. Python and JavaScript are also good for gluing together tools that do disparate things and simple automation. But they can do arithmetic and graphics, too! And without the enormous overhead of forking a process to perform simple arithmetic and string manipulation. Bash scripts aren't good for many useful tasks because bash is badly designed, not because there's some universal law of computing that proclaims that scripts should never use floating point numbers or draw graphics. Apple figured all this out in 1979 when they made a deal with Microsoft and switched from INTEGER BASIC to APPLESOFT BASIC, and added floating point and HIRES graphics. Even Apple ][ DOS 3.2 could deal with file names with spaces in them! How long will it take the Unix community to figure that out, too? https://www.youtube.com/watch?v=RiWE-aO-cyU https://www.youtube.com/watch?v=RiWE-aO-cyU