[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: |
Pádraig Brady |
Subject: |
Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened |
Date: |
Sat, 21 Nov 2015 00:21:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 20/11/15 23:58, Jirka Hladky wrote:
>> On Sat, Nov 21, 2015 at 12:01 AM, Bob Proulx <address@hidden
>> <mailto:address@hidden>> wrote:
>>
>> Bernhard Voelker wrote:
>> > I'm not convinced that a new --no-stdout option is warranted:
>> > why not simply redirect stdout to the last fifo?
>> >
>> > cat /dev/zero | head -c500M \
>> > | (/dev/shm/AAA/coreutils-8.24/src/tee -p \
>> > $d/fifo1 $d/fifo2 $d/fifo3 > $d/fifo4 ) 2>&1 \
>> > | > tee $d/run.log &
>>
>> Of course! It was so obvious that we missed seeing it! Simply do a
>> normal redirect of stdout to the process. Thanks Bernhard for
>> pointing this out.
>>
>> This is also true of the >(process substitutions) too.
>>
>> echo foo | tee >(sleep 2 && cat) > >(sleep 5 && cat)
>>
>> This really argues against any need for --no-stdout. Because if one
>> wants --no-stdout it means one has forgotten about a normal
>> redirection.
>
> Yes, *this is* the solution I was looking for!
>
> tee -p </dev/zero >(head -c1 | wc -c ) > >(head -c10M | wc -c)
>
> Thanks to everybody to take part in the discussion and finally coming up with
> the solution.
>
> Could we please add this example to tee's manual page into the EXAMPLE
> section? If there is anything I can do to make it happen please let me know.
Yes it works well.
I've added the construct to the existing tee examples in the attached.
thanks,
Pádraig.
tee-combining-process-substitutions-doc.patch
Description: Text Data
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, (continued)
- 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
- 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,
Pádraig Brady <=
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Bob Proulx, 2015/11/22
- 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/22
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Jirka Hladky, 2015/11/23
- 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/23
- Re: Enhancement request for tee - please add the option to not quit on SIGPIPE when someother files are still opened, Jirka Hladky, 2015/11/22
- 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, 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, Jim Meyering, 2015/11/20
- 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