GNU bug report logs - #21919
tee enhancement

Previous Next

Package: coreutils;

Reported by: "Tim Shaw" <timshaw <at> mail.usa.com>

Date: Sat, 14 Nov 2015 16:09:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 21919 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Tim Shaw <timshaw <at> mail.usa.com>, 21919 <at> debbugs.gnu.org
Subject: Re: bug#21919: tee enhancement
Date: Mon, 16 Nov 2015 08:06:18 +0100
On 11/14/2015 05:00 PM, Tim Shaw wrote:
> What I would like to do is add a parameter to tee, "-2", that copies to stderr in addition to stdout, just like "-"
> copies to stdout twice. So the code becomes
>     echo big long complicated error message goes here | tee -2
> Simple, eh?

Having an additional option to refer to a certain file descriptor
sounds worthwhile and tempting.  OTOH, you can already refer to
/dev/stderr as a file name for the 2nd file descriptor already
on many/most systems:

  echo big long complicated error message goes here | tee /dev/stderr

Does this work for you?

> Where's the tee source? I know this would not be POSIX compliant, but it would work for me, and I hate having to rewrite
> everything from scratch for trivial stuff like this.

http://git.savannah.gnu.org/cgit/coreutils.git/tree/README-hacking

Have a nice day,
Berny




This bug report was last modified 6 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.