Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The Mighty Named Pipe. Parent comment
so:
cmd1 | tee out.txt | cmd2
With process substitution you can do extra stuff on the way out, I guess (I've never seen it used for output before).
It looks like in the example given they're writing wc stuff to stderr while zipping the content (over stdout).
Nice to see that example, I hadn't even thought about the usefulness of process substitution for outputting like this!
There are no comments on this comment yet.
so:
So tee is splitting the stream into two outputs, one that carries on out stdout (into cmd2) and the other one that is redirected into out.txt.With process substitution you can do extra stuff on the way out, I guess (I've never seen it used for output before).
It looks like in the example given they're writing wc stuff to stderr while zipping the content (over stdout).
Nice to see that example, I hadn't even thought about the usefulness of process substitution for outputting like this!