#!/bin/csh -f # # run errpt and print the errors for the last 24 hours email to root # # Set global variables @ D24 = `/bin/date '+%d'` @ D24 = $D24 - 1 set M24 = `/bin/date '+%m'` set MD24 = `/bin/echo $M24$D24` set H24 = `/bin/date '+%H%M%y'` set T24 = `/bin/echo $MD24$H24` set DATE = `/bin/date '+%C%y%m%d'` set COUNT = `/usr/bin/errpt -s $T24 | /bin/wc -l` /bin/echo "There have been" $COUNT "errors generated in the last 24 hours as of" `/bin/date` /bin/echo "start date:" $T24 # summary report /usr/bin/errpt -s $T24 # detail report #/usr/bin/errpt -s $T24 -a