On 10/12/2014 at 10:07 AM, Andrei POPESCU wrote: > On Sb, 11 oct 14, 21:40:49, Steve Litt wrote: > >> From my viewpoint, shellscripts were never intended to be big, >> huge programs. To me, they just glue together commands, and have a >> few rudimentary branching and looping constructs. > > Isn't that like buying IKEA furniture, but when you get home you > realise all those little plastic bags with screws and mounting pieces > are missing? I will say this:
Except that A: different "glue" (screws and mounting pieces) may be required for different environments where you would use the "furniture"; B: there's no practical way to predict all possible environments where someone might want to use it, or to provide the necessary "glue" for all of those unpredicted environments; C: there's a lot more room for individual flexibility in shell scripts, et cetera, than there is in furniture assembly hardware; and D: in many / most cases, the "glue" is already provided for you (either by upstream or by some middleman) by the time the "furniture" reaches you to begin with. In addition, I understood the comment you're responding to as being about shell scripts as an overall idea, rather than about their usage in any particular context. It's entirely possible for the needed scripts to have been written by upstream, just as it would be possible for logic in other languages to have been written by upstream. All that comment seems to say is that shell scripts are specifically intended as the "glue" to let you stick together existing components *in whatever way you happen to want*, as opposed to being intended as a building block for contructing such components. If you don't need to stick the components together because they're fine on their own (e.g., grep is useful without any shell constructs), that's OK; if you want to stick the components together using something else, that's fine too; but if you want to stick them together, shell scripts are one tool you have with which to do so. > Any program that requires additional scripting just to get it running > is insufficiently advanced. > > (you can quote me on that) Part of the tradeoff for power is responsibility - both in the responsibility to use the power wisely, and in the responsibility to do things yourself rather than have others do them for you. If you don't want the responsibility of writing shell scripts (or other scripting), you will have to accept not having the power to do some of the things you could do with such scripts. If you don't want that power either, that's fine for you - but others may not feel the same way. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature