timeup


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting timeup
# 1  
Old 08-07-2006
timeup

hey, I need to write a script which would monitor a directory for certain file existence until certain time. I got the monitoring part and I was able to make the script to monitor the directory for a duration of time (say 4 hours), but what I want is for script to monitor a directory until a specific time (i.e. 4:00 am), can anyone help? thanks!
# 2  
Old 08-07-2006
Hi Smilie ,

Write an Infinite Loop in Which check time whether it is greater than 04 AM then Exist From Script.

Code:
While [ 5 ]
do
# PASTE HERE YOUR FILE MONITRING WORK SCRIPT ....
TIME=`date +%H%M`
if [[ $TIME -gt 0400 ]]; then
   exit 1
fi
done

Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question