'peeking' in on a pipe

Mike Eisler mre at beatnix.UUCP
Fri Jul 14 11:05:43 AEST 1989


In article <6.24B47361 at seaeast.WA.COM>, Tim.Evans at 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



More information about the Comp.unix.questions mailing list