[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enhancement request for tee - please add the option to not quit on S
From: |
Bob Proulx |
Subject: |
Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened |
Date: |
Wed, 18 Nov 2015 16:13:35 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Jirka Hladky wrote:
> I have recently run into an issue that tee will finish as soon as first
> pipe it's writing to is closed. Please consider this example:
>
> $cat /dev/zero | tee >(head -c1 | wc -c ) >(head -c100M | wc -c ) >/dev/null
> 1
> 65536
>
> Second wc command will receive only 64kB instead of expected 100MB.
Expectations depend upon the beholder of the expectation. :-)
> IMHO, tee should have a command line option to proceed as long some file is
> opened.
>
> cat /dev/zero | mytee --skip_stdout_output --continue_on_sigpipe >(head -c1
> | wc -c ) >(head -c100M | wc -c )
If you ignore SIGPIPE in tee in the above then what will terminate the
tee process? Since the input is not ever terminated.
Also, a Useless-Use-Of-Cat in the above too.
> It should be accompanied by another switch which will suppress
> writing to STDOUT.
Isn't >/dev/null already a sufficient switch to supress stdout?
Bob
- Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Jirka Hladky, 2015/11/18
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Pádraig Brady, 2015/11/18
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened,
Bob Proulx <=
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Bob Proulx, 2015/11/18
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Jirka Hladky, 2015/11/19
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Pádraig Brady, 2015/11/19
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Bob Proulx, 2015/11/19
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Jirka Hladky, 2015/11/19
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Assaf Gordon, 2015/11/19
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Pádraig Brady, 2015/11/20
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Jirka Hladky, 2015/11/20
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Bernhard Voelker, 2015/11/20
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Bob Proulx, 2015/11/20