2 ms·
I think Bash is much more than that. For example, I mostly compose chains of commands through pipes. This extension is not pipe-centric.
by visarga 9y ago
I think Bash is much more than that. For example, I mostly compose chains of commands through pipes. This extension is not pipe-centric.
- robinhoodexe 9y agoThis so much. Using grep, cat, cut and sed to parse log files (in my case output from quantum chemical calculations) is really nice.
- pfranz 9y agoI think the scope for Bash has shrunk a lot since Perl and moreso Python have become widely adopted. The rule of thumb I usually have is "if it's more than 50 lines, reevaluate if shell scripting is the best language." I was working at a place that had been around since the early 80s. It looks like the "official" scripting language was tcsh until around the early 2000s, then Perl was preferred, and around the late 2000s they switched to Python. I ported a bunch of tcsh scripts that missed their Perl transition and was I impressed (I didn't often see "structured" shell scripts with actual design patterns) and the fact they were still used daily. I feel like my Python version had less boilerplate, better error checking, and was more legible. If you look at the OS itself, a lot of what used to be done with shell scripts migrated to Python2 years ago (which made the move to Python3 tougher)--but the scripts are more legible and maintainable. I do still love the challenge of running a command and trying to get my result in one line.