The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-04-2008
senthilkumar_ak senthilkumar_ak is offline
Registered User
  
 

Join Date: Aug 2008
Location: Chennai
Posts: 43
Well yes you're right, the log files contains only one day logs. But with this condition i wont be check the job when not ran, so i modified little and used like this , please let me know if done some thing wrong.

# Loop to check the Job1 <Send To CM started properly or not>
if [ $min -ge 1 -o $min -lt 30 ]; then
count=`grep -ic ": $hr:01.*SendToCM: Start:" $logpath`
elif [ $min -ge 30 -o $min -le 59 ]; then
count=`grep -ic ": $hr:30.*SendToCM: Start:" $logpath`
fi
if [ $count -eq 0 ]; then
echo -e "\nThe Job1 Send To CM is not started as schdueld at 1 and 30" >> mail.log
fi

i will mail the mail.log at last after checking for other jobs too