Date: Tue, 4 Jun 2002 11:43:19 -0400
Reply-To: "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
Subject: automated error checking in logs
Content-Type: text/plain; charset="iso-8859-1"
I would like to add a code snippet or macro to the end of some of my daily
batch jobs. It would examine the log file (already copied to an external
file), and "grep" for certain words, like "error" and "uninitialized". I'm
looking for the easiest way to do this. My first thought was to pipe the
results of "grep -is 'error' <file>" to a filename, and read the results,
doing this for each of the keywords. Are there better ways?
Note that I don't care about the actual contents of the grep results. I
don't care what it said, -- I will go back and examine the logs by hand -- I
just want to know *if* there was an error, so I can trigger an email to
P.S. V8.2, unix on solaris, jobs being run via crontab batch jobs