On 04/23/2013 01:57 PM, Camion SPAM wrote:
> Hello, I could like to suggest the following patch for tee.
> It addresses the following problems :
> 1/ Add a new -t parametre to have tee work line per line instead of block by
> block (Usefull if you use tee to check script results while they are sent to
> a file or anywhere else
tee works in non buffered mode by default
so I need to consider the implications of "text mode".
> 2/ Ignores SIGPIPE so that it can close a broken pipe and continue tee-ing on
> others.
The more general tee --write-error={[cont],ignore,exit}
should handle this http://bugs.gnu.org/11540
It's nearly at the top of my TODO list.
> This is useful when you write things like this
>
> $(some_command | tee /dev/fd/3 | some_processing_1) 3>&1 |
> processing_2_not_reading_up_to_the_end
>
> In this case, when processing_2 stops reading, tee will receive SIGPIPE and
> will be killed preventing processing_1 from receiving it's data.
thanks,
Pádraig.