LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: "Mailing List SAS-L (E-mail)" <SAS-L@uga.cc.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"

Hi all,

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 myself.

-Brad

P.S. V8.2, unix on solaris, jobs being run via crontab batch jobs


Back to: Top of message | Previous page | Main SAS-L page