3 ms·
I feel like the reasons for this are: * Shell scripts force you to think in a more scalable way (data streams) * Shell scripts compose rich programs rather th
by jb3689 4y ago
I feel like the reasons for this are:
* Shell scripts force you to think in a more scalable way (data streams)
* Shell scripts compose rich programs rather than simplistic functions
* Shells encourage you to program with a rich, extensible feature set (ad-hoc I/O redirection, files)
The only times I don’t like shell scripts are when dealing with regex and dealing with parallelism
- chasil 4y agoThe POSIX shell does not implement regex. What is used both in case/esac and globbing are "shell patterns." They are also found in variable pattern removal with ${X% and ${X#. In "The Unix Programming Environment," Kernighan and Pike apologized for these close concepts that are easily mistaken for one another. "Regular expressions are specified by giving special meaning to certain characters, just like the asterix, etc., used by the shell. There are a few more metacharacters, and, regrettably, differences in meanings." (page 102) Bash does implement both patterns and regex, which means discerning their difference becomes even more critical. The POSIX shell is easier in memory for this reason, and others. http://files.catwell.info/misc/mirror/ http://files.catwell.info/misc/mirror/
- gpderetta 4y ago> The only times I don’t like shell scripts are when dealing with regex and dealing with parallelism Wow, for me parallelism is one of the best features of a unix shell and I find it vastly superior to most other programming languages.
- fomine3 4y agoIt's great for embarrassingly parallel data processing, but not good for concurrent/async task.
- partdavid 4y agoCan you expand on the parallelism features you use and what shell? In bash I've basically given up managing background jobs because identifying and waiting for them properly is super clunky; throttling them is impossible (pool of workers) and so for that kind of thing I've had to use GNU parallel (which is its own abstruse mini-language thing and obviously nothing to do with shell). Ad-hoc but correct parallelism and first class job management was one of the things that got me to switch away from bash.
- fluential 4y agoGNU parallel