3 ms·
I love shell, I think it's killer feature are pipes and whoever figured out how to design so you can pipe in and out of control structures(Doug Mcilroy?) is a g
by somat 2y ago
I love shell, I think it's killer feature are pipes and whoever figured out how to design so you can pipe in and out of control structures(Doug Mcilroy?) is a goddamn genius. however, after writing one to many overly clever shell scripts, I have a very clearly delineated point in which the script has become too complex and it is time to rewrite in a language better suited for the task. and that point is when I need associative arrays.
A lot of the sins of shell are due to it's primary focus as an interactive language. Many of those features that make it so nice interactively really hurt it as a scripting language.
- DSpinellis 2y agoPipe-related concepts in various restricted forms were floating around for years. Doug McIlroy indeed proposed them in 1964 and was heading the Bell Labs team when they were implemented in the Third Research Edition of Unix (1973). See https://youtu.be/FbDebSinSQo?si=xbWIqES80hI2S802&t=901 https://youtu.be/FbDebSinSQo?si=xbWIqES80hI2S802&t=901
- emmelaich 2y agoSure, but in and out of control structures? I think that's the major point your parent was making.
- orbisvicis 2y agoControl structures? Do you mean something like '{ cmd1 || cmd2; } | cmd3', where the control structures are the braces?
- layer8 2y ago“Control structure” normally refers to conditionals and loops. You can pipe in and out of a for loop in the shell, maybe that’s what they mean.