Skip to main content
7 events
when toggle format what by license comment
Feb 12, 2015 at 22:49 comment added Scott - Слава Україні OK, I understand why … | tee /dev/stdout | … is a bad idea -- because I figured it out; I'm not sure whether I would have gotten it from your comment if I hadn't figured it out on my own first. The reason is that, when tee opens /dev/stdout, it refers to tee's stdout, which is the pipe to bar. My point is that if the user says make rcheck > make.out, then foo's stdout goes to the terminal when it should go to make.out. Therefore, this does not quite meet the OP's requirements.
Feb 12, 2015 at 19:47 comment added godlygeek @Scott, /dev/stdout is getting a copy of foo's output without us doing anything. We add tee to the pipeline so that foo's output gets written to both /dev/stdout (which will become input for bar), and delivered unchanged to /dev/stderr (which is still wired to the terminal).
Feb 12, 2015 at 11:48 comment added Scott - Слава Україні Since we're piping foo's stdout, shouldn't the tee be writing to /dev/stdout?
Feb 11, 2015 at 22:40 history edited godlygeek CC BY-SA 3.0
added 16 characters in body
Feb 11, 2015 at 22:40 comment added godlygeek @Gilles, thanks for the edit - I missed the requirement that the original text be displayed; I was picturing a filter program that manipulated the text before it was displayed.
Feb 11, 2015 at 22:27 history edited Gilles 'SO- stop being evil' CC BY-SA 3.0
display the output of foo on the as well as passing it to bar; ignore the return status of bar
Feb 11, 2015 at 21:17 history answered godlygeek CC BY-SA 3.0