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 [EMAIL PROTECTED] Charlottesville, VA