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