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 .
You posted the error file as a Word document. Is it truly a Word document?
Can you simply cut/paste a section of the log into your response. Make sure to use th Code Tag. [Highlight the section of your message, then press the \# icon button -- this will maintain formatting and spacing.]
Finally, if I understand you request, you are try to search from a particular data & time forward only. Please verify on this.