5 ms·
> No "proper programming language" is capable of ergonomically piping between programs. You cherry-picked the one thing that shell script is somewhat better at
by ccalloway 5y ago
> No "proper programming language" is capable of ergonomically piping between programs.
You cherry-picked the one thing that shell script is somewhat better at than other languages (not even really needed for this task). Meanwhile the article uses shell for both making HTTP requests and mangling JSON data, both of which are easy in all modern languages, and extremely painful in shell.
- actually_a_dog 5y agoIt's not cherry picking to mention the thing that makes a fundamental component of the UNIX philosophy work. > (ii) Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input. https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s...
- ccalloway 5y agoOK, the Unix philosophy holds that this is one of the most important things, and therefore it's easy to do in shell. But what if it's not? It's perfectly easy to write code to do the same thing in a programming language without invoking any other executables, let alone piping the output of one into the input of another. So the claim that this functionality is what makes Unix and shell scripting effective is vacuous. They are good at doing something which would not be necessary if one was not using them.
- Kinrany 5y agoBeing able to compose programs is not a necessity, but it saves effort. A single pipe replaces M*N different programs with M+N different programs. This is how Unix won.
- deleted 5y ago[deleted]