2 ms·
You can do that by using mkfifo relatively easy, but I take your point. In that sense, the most "flexible" language is pure C, because you can do anything there
by OskarS 1y ago
You can do that by using mkfifo relatively easy, but I take your point. In that sense, the most "flexible" language is pure C, because you can do anything there. I guess a better word is "ergonomic": if you want to do `curl something | grep whatever > output.txt` in C or Python or whatever other general purpose language, it's MUCH more difficult. Writing lines like that is trivial for me in shell scripting, I just did it in this comment. If I had to do it in Python, I would have to spend 20 minutes studying the precise flags to pass to subprocess.Popen and think really hard about which streams to call .close() on and when. God help me if I was doing it in C and using fork()/exec().
This is the shell scripting super-power, all this stuff is just trivial.