Shell scripting

Printer-friendly version

Your list of horrible alternatives

The only thing worse than shell scripting is doing without shell scripting.
Half a century on and we are still not great at bespoke automation of tasks.
Unix-esque shell scripting is one passable methods for automation of some
tasks.
Except that it is a ghastly quagmire of chaos, and, as usual,
for various path-dependent reasons,
the dominant players in the market have especially high chaos content in their quagmire.

Let’s review some alternatives.

  • bash is the default for most humans who must journey into this grim dale of
    automation.
    It has the virtues of having decades of careful crafting,
    and of ubiquity,
    and the vice of having decades of bitrot,
    accomodation to ill-considered primordial design choices,
    and of occasionally uploading all your personal data to online gangsters.
  • fish has a strong fanbase and principled design,
    and may or may not be awesome;
    I would not know, because it is too different to bash for me to have taken
    the time to learn for fear of yak shaving.
    If nothing else, it has a healthy degree of sarcasm in its documentation
    (“Finally, a command line shell for the 90s!”)
    absent from the drearily earnest nerdview of your typical gnu.org project.
  • dash is a less bloated bash clone, which doesn’t seem advantage enough to
    sell it widely.
  • zsh was a young turk to bash once,
    and now may be seen stomping about the internet waving its walking cane
    and complaining
    about the benighted conservatism of that frightful old fart, bash.
  • Plumbum brings a shell “feel” to python, and looks passionately maintained
    if not broadly used.
  • xonsh uses a hybrid of python and bash syntax
    and has light dependencies plus the python standard library,
    as well as some light mockery of the design choices in plumbum.
  • rush is here and there, too. Some kind of ruby-backed shell?
    I don’t know, my minds is beginning to wander.
  • Windows users have powershell, which looks good,
    although it comes attached to an unfortunate
    piece of bloatware called “windows”.
  • There are many, many others, most of which only last a year or two
    before their maintainers resign and use bash.
    You too can roll your own.
    Idea: create vanity-project shells cash, trash, theclash, and
    bangersandmash.

Practical things I need to remember

See original: The Living Thing / Notebooks Shell scripting