httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
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:

> foo.sh 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:

foo.sh >/tmp/foo.log 2>&1

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message