See also: Redirecting STDOUT and standard error to file
HTH,
In reply to Re: Capturing shell command error by planetscape in thread Capturing shell command error by kulls