coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tee: add option for outputting to stderr


From: Pádraig Brady
Subject: Re: [PATCH] tee: add option for outputting to stderr
Date: Thu, 19 Jan 2017 00:32:29 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 18/01/17 23:02, Peter Berbec wrote:
> When writing scripts, the ability to send something to stdout and stderr 
> sometimes comes up. I have written a patch to tee.c adding an option for 
> this.
> 
> Peter Berbec
> 
> 47a48,50
>> /* If true, output to stderr as well */
>> static bool out_to_error;
>>
> 61a65
>>   {"error", no_argument, NULL, 'e'},
> 92a97
>>   -e, --error               also output to stderr. negates -p\n\\

Why negate -p exactly?
How common is the need for this? I've never needed it I think.
Have you an exact use case.

You could do this in bash/ksh like:
  seq 10 | tee >(cat 1>&2)
You could do this on most Unix systems:
  seq 10 | tee /dev/fd/2

Would that suffice?

thanks,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]