httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: Perl framework ignoring stderr redirection?
Date Tue, 20 Nov 2001 16:28:38 GMT
On Tue, 20 Nov 2001, Rodent of Unusual Size wrote:

> 2>&1 > /tmp/foo.log
> And so I do -- for everything in the script *except* the stderr
> stream from t/TEST, which comes to my screen instead.
> WTH??  Why, and how to fix?

Um, because that's what that shell construct is *SUPPOSED* to do?  :-)
Order is important.  If you do the 2>&1 _before_ redirecting stdout, it
means that stdout will get redirected and stderr will become stdout but
not also get redirected.  If you do the 2>&1 _after_ redirecting stdout,
both will get redirected.  What you want is this: >/tmp/foo.log 2>&1


   Cliff Woolley
   Charlottesville, VA

View raw message