GNU bug report logs - #8408
A possible tee bug?

Previous Next

Package: coreutils;

Reported by: George Goffe <goffe <at> google.com>

Date: Fri, 1 Apr 2011 20:41:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


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

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: goffe <at> google.com (George Goffe)
Cc: 8408 <at> debbugs.gnu.org
Subject: Re: bug#8408: A possible tee bug?
Date: Fri, 1 Apr 2011 16:34:30 -0500 (GMT+5)
George Goffe writes:
> 
> Howdy,
> 
> I have run several scripts and seen this behavior in all cases...
> 
> tee somescript | tee somescript.log 2>&1
> 
> The contents of the log is missing a lot of activity... messages and so
> forth. Is it possible that there are other file descriptors being used for
> these messages?

I can't tell what you're trying to do from this incomplete example, but it
looks like you're expecting the 2>&1 to do something other than what it's
actually doing. It's only pointing the second tee's stderr to wherever its
stdout was going.

If the above pipeline is run in isolation from an interactive shell prompt,
the 2>&1 is accomplishing nothing at all, since stderr and stdout will
already be going to the same place (the tty) anyway.

tee's stderr will normally be empty; it would only print an error message
there if it had trouble writing to somescript.log.

Post a more complete description of your intent.

-- 
Alan Curry




This bug report was last modified 14 years and 58 days ago.

Previous Next


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