Redirecting stdout & stderr
Posted in 1996
In some of my shell Unix shell scripts, I send the stdout & stderr to a logfile using something like - isql -qr posttis.sql > /financ/logfile1 2>&1 per a message posted here some months ago. Then, I scan that logfile for errors via egrep, looking for keywords like err, Err, etc. What I'd really like to do is direct stdout to one file and stderr to a different file! Can that be done in one command? Alternatively, I am going to try to come up with some filter which will strip blank lines and '1 row updated' statements, which should leave only error messages. Any thoughts would be appreciated. Tanks, Joe Hoin US Army Tank-Automotive & Armaments Command hoinj@cc.tacom.army.mil