Shell Script Vs Scripting Language Script

Use a shell script if:

Use a ScriptingLanguage if:

And, to go both ways, you can always use SchemeShell?...

Shells have one vastly superior control structure over most other languages: pipes. Data structures are quite nasty in the standard unix shells, however, and even ones that do provide arrays (e.g. bash) provide a rather nasty syntax for it. Even bash has refused to evolve to contain primitives for sophisticated string handling such as matching and substituting, and shelling out to grep and sed (with their incompatible syntaxes and all) is hardly a substitute.

Correct me if I'm wrong, but aren't most full-fledged scripting languages capable of handling pipes pretty much the same way as Shell Script languages? Perl, for instance?

There are pipe libraries for popular dynamic languages like Ruby and Python, and are convenient due to OperatorOverloading. Nevertheless they pretty much avoid the need for piping random programs together due to their rich standard libraries.


EditText of this page (last edited September 5, 2010) or FindPage with title or text search