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: peter
Subject: Re: [PATCH] tee: add option for outputting to stderr
Date: Wed, 18 Jan 2017 19:48:30 -0500

   I know there are other ways to do this. I've been using them :)
   Splitting output being tee's main purpose, adding the ability to make
   the destination stderr seemed useful.
   As I understood, -p sends error information about the stream to stderr,
   and this would conflict. If I misunderstood, that simplifies the patch
   somewhat!
   Peter Berbec
   (917) 213-2594
   On Jan 18, 2017 7:32 PM, Pádraig Brady <address@hidden> wrote:

     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]