[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8408: A possible tee bug?
From: |
George Goffe |
Subject: |
bug#8408: A possible tee bug? |
Date: |
Fri, 1 Apr 2011 15:36:57 -0700 |
Alan,
Oops. I goofed... My apologies.
The example would be this "somescript | tee somescript.log 2>&1".
The intent is to capture all the output (stdout and stderr) from
"somescript". "somescript" runs several commands that may or may not utilize
other FDs. I was hoping to get a better output than what you might get from
the script command which records all the messages + a ton of other things
like escapes which are a pain to eliminate.
Does this make better sense?
Regards,
George...
On Fri, Apr 1, 2011 at 2:34 PM, Alan Curry <address@hidden> wrote:
> 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
>