I am sorry to say, but this script won't help anything.
THis script only tests if "errpt -a" is working or not, but not if a new error arrived in the errpt.
You are better off trying this script:
http://www.stanford.edu/~ssklar/errreporter/errreporter
or write something your own, comparing the timestamps of entries since last <n> minutes.
You can also use errnotify, described here:
http://publib.boulder.ibm.com/infoce...ror_notice.htm
I only thing is, I had problems with errnotify in this case (errpt), because always when an error comes in, the script that will send you a mail for example, is triggered.
We needed a script, that will just put the errors alltogether in one mail, which happened in the last interval to avoid spam. We also needed to differ between PERM H(ardware) errors and other types of H errors.
Maybe you can also get something useful out of using "errpt -c" piping to some processing which will work like a tail -f on errpt. If entries occure, you can always have a filter up or something that will work with the output.