[PLUG] Correct use of 'tee'

Eli Stair eli.stair at gmail.com
Mon Jan 16 09:30:16 PST 2006

Pardon for replying without reading the entire thread, but thought
this may be relevant:

When you're expecting some set output handling to work, sometimes it
doesn't occur the way it "should".  One recent example, redirecting
STDERR/STDOUT from SLES9's rsync is improper for some reason.  You can
correctly redirect 1> 2> when running it in 'normal' or debug, but the
verbose mode doesn't work... comes out properly to the command line,
but when you do 2> /tmp/test.txt your stderr never gets there (or to

Sometimes when you're just starting to think you're crazy, it really
IS something behaving erraticly :)


On 1/16/06, Rich Burroughs <rich at paranoid.org> wrote:
> David Fleck wrote:
> > Except that programs often send warnings and informational messages to
> > stderr, not stdout. 'tee' won't capture stderr unless it's redirected to
> > stdout.
> Right.
> tee is a great tool, Rich, it's a good one to learn. It's very handy at
> times to be able to see stdout and also grab it to a file and tee makes
> that very easy.
> One question, as you're troubleshooting, is whether tee is even broken.
> It may be working as designed, or there may be something else broken in
> your environment.
> One interesting comparison would be to run the command and send stdout
> and stderr out to a file without using tee, then compare and see if you
> get a different result when you use tee. You could do it to two
> different output filenames and diff them.
> I don't generally redirect stderr when I use tee so I'm not positive of
> the syntax. I just use tee as a quick and dirty way to grab stdout while
> I watch it. As with most *nix things, there are a lot of different ways
> to do all of this :)
> I did see this page, which you may have already seen:
> http://www.cpqlinux.com/redirect.html
> Rich
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug

More information about the PLUG mailing list