3 ms·
Good point. A "small script" might not necessarily be very simple - it might only have 5-10 lines, but those lines might involve parsing HTML, connecting to a
by i336_ 11y ago
Good point.
A "small script" might not necessarily be very simple - it might only have 5-10 lines, but those lines might involve parsing HTML, connecting to a remote host somewhere, running a one-time listening server, nontrivially processing a set of files... any number of different tasks.
sh is good for job execution, piping and redirection, and task management, and it launches processes like sed, grep, and awk to handle text processing. Beyond that, simple, one-time HTML parsing can be done with sed and grep, but it doesn't work very well (and I'd never use it in production), I can't really easily connect to a server without netcat or socat (or, in a pinch, bash's exec operator, which is slow in practice - I wrote an IRC bot in bash, its CPU usage skyrocketed easily), or for more complex tasks involving HTTP requests, curl or wget.
It's ultimately impossible to know whether someone has Python, Perl, Tcl, Haskell, Ruby, Node.js, or even PHP installed, and able to run console scripts... but only a language like one of these comes with a base library competent enough to include functionality to achieve all the goals I noted above.