script for finding an error from a log file
Hi ,
I have a doubt about a shell script to find an ERROR from the log file. But I need to specify a the scan from a particular date and time in the log. Till now I have developed the following script. Please suggest what shall I add in this for date and time. If the script finds a particular error it should throw 1 or else 0.
#!/bin/sh
# Script to find the error in the log file
ERROR="SCHD0061E"
read ERROR
if [ $ERROR="SCHD0061E" ] ;then
echo "1";
else echo "0"
fi
Kindly suggest what else is missing from this script. And how to specify the path for the log file .
Thanks & Regards
Last edited by himvat; 11-17-2008 at 03:25 PM..
|