lblauen
Technical User
- Aug 13, 2002
- 69
I have a script that I run everyday. It shows all errors in the errpt since midnight till now. I need it to show yesterday midnight till today. In other words true 24hours. Here is the script. Any help would be nice. Thanks in advance Lloyd.
echo "----- Display Error Report for past 24 hours"
echo
DATE=`date +%m:%d:%y`
START="`echo $DATE |awk -F\: '{print $1$2"0000"$3}'`"
ERRORS="`errpt -s $START`"
if [[ -n $ERRORS ]]; then
errpt -s $START | pg
else
echo "No errpt entries for today, `date +%D`"
fi
echo
echo Press Enter ;
read DUMMY ;
echo "----- Display Error Report for past 24 hours"
echo
DATE=`date +%m:%d:%y`
START="`echo $DATE |awk -F\: '{print $1$2"0000"$3}'`"
ERRORS="`errpt -s $START`"
if [[ -n $ERRORS ]]; then
errpt -s $START | pg
else
echo "No errpt entries for today, `date +%D`"
fi
echo
echo Press Enter ;
read DUMMY ;