The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-07-2006
Registered User
 

Join Date: Mar 2006
Posts: 89
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!
Reply With Quote
Forum Sponsor
  #2  
Old 08-07-2006
Registered User
 

Join Date: Jul 2006
Posts: 19
Hi ,

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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0