![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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!
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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 |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|