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, and the least awful for many, so you’d better learn it, or hire a personal assistant. Except the problem is that shell scripting is a ghastly quagmire of chaos, and, as usual, for the traditional variety of path-dependent reasons, the dominant players in the market have especially high chaos content in their quagmire.
Your list of horrible alternatives
- bash is the default for most humans who must sojourn in 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, accommodation 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 not bash, so I am afraid that learning it is procrastination. If nothing else, it has a healthy degree of sarcasm in its documentation (“Finally, a command line shell for the 90s!”) That sarcasm is sorely absent from the drearily earnest nerdview of your typical gnu.org project.
- dash is a less bloated bash clone, which by itself 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 mind is wandering, Dave. Wou
- Windows users have powershell, which sprang from windows but now runs everywhere and is open source
- And now windows has bash too, and no one is safe
- 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 vanity shell.
Idea: create vanity-project shells cash, trash, theclash, and bangersandmash.
Realistically you’re using bash; now what?
If you are going to use bash, avoid its paradigmatically awful manual, and use the bash hackers wiki.
!n - the nth history, !-n the nth-most-recent !string refers to the most recent command in the history starting with string, !?string[?] refers to the most recent command containing string