Andreas Schwab wrote:
> > $ rm -f empty; touch empty; rm -f output output2; \
> >   for a in 0 1 2 3 4 5 6 7 8 9 ; do \
> >     for b in 0 1 2 3 4 5 6 7 8 9 ; do \
> >       echo g$a$b | tee -a output; \
> >       echo h$a$b >> output2; \
> >     done; \
> >     sleep 2; \
> >   done \
> >   | { sleep 1; join --nocheck-order -v 2 - empty; }
> >
> > The 'join' command notices that its second argument is empty, stops reading,
> > and exits immediately.
> 
> The tee process then receives a SIGPIPE when trying to write to the
> broken pipe.  That will kill it.

Thanks for explaining.

If 'tee' was to write to the log file(s) first and then only to stdout, and
if the input is small (does not need buffering), then its stdin input would show
up in the output, and this would also be POSIX compliant.

Bruno



_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to