tee command without buffering

John Gilmore gnu at l5.uucp
Wed Dec 11 23:00:10 AEST 1985


In article <509 at brl-tgr.ARPA>, kvancamp at ardc.arpa (LCWSL) writes:
> Thanks to all of you who responded to my question about stopping buffering
> of the tee command (so I could see my output at the same time I echo it
> to a file)...what I wanted is
> impossible because the buffering is inherent in the system (i.e., it isn't
> the fault of tee...

The problem is that a program whose output is a pipe will buffer
up a large block of stuff before it writes it to the pipe.  If the output
is to a terminal, it sends it out as soon as the program writes it.
This is done by the standard I/O library to improve performance.
Thus if you have xxx | tee file  the problem is in stdio in xxx; it's
not in "tee".  There's no particularly good solution.



More information about the Comp.unix mailing list