Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ig!ames!vsi1!altos86!elxsi!beatnix!mre From: mre@beatnix.UUCP (Mike Eisler) Newsgroups: comp.unix.questions Subject: Re: 'peeking' in on a pipe Message-ID: <2830@elxsi.UUCP> Date: 14 Jul 89 01:05:43 GMT References: <6.24B47361@seaeast.WA.COM> <193@safn2.UUCP> Sender: news@elxsi.UUCP Reply-To: mre@beatnix.UUCP (Mike Eisler) Organization: ELXSI Super Computers, San Jose Lines: 14 In article <6.24B47361@seaeast.WA.COM>, Tim.Evans@f112.n138.z1.WA.COM (Tim Evans) writes: > I would like to 'peek' in on a pipe, to see what is happening in it, WHILE > IT EXECUTES. I tried something like this, but no luck: > > some_stuff | tee `tty` | more_stuff Try some_stuff | tee /dev/tty | more_stuff ... | tee `tty` | more_stuff fails because tty(1) calls ttyname(3) to find terminal name with file descriptor 0 as its argument. Fd 0 is a pipe when tee is used inside a pipeline. uunet!elxsi!mre