![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| On relationships among: derived event, composite event, complex event and situation | iBot | Complex Event Processing RSS News | 0 | 07-17-2008 07:50 AM |
| wait command - cat it wait for not-chile process? | alex_5161 | Shell Programming and Scripting | 2 | 06-26-2008 07:14 PM |
| Need to execute 2 scripts, wait, execute 2 more wait, till end of file | halo98 | Shell Programming and Scripting | 1 | 08-01-2006 05:42 PM |
| How to find the File Age and wait for that... | redlotus72 | UNIX for Dummies Questions & Answers | 3 | 06-01-2005 04:13 AM |
| Lock a file. AND Wait if file is locked | sunil_neha | Shell Programming and Scripting | 2 | 07-13-2004 11:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
event or file wait scenario
i want to do 2 things
1) i should wait for a file called A.txt to fall on a specific path on the server 2) once the file arrives immediately another script called B.sh should be executed. Could you please throw somelight on this. Any code if already present that would be helpful. Regards Rajesh |
|
||||
|
One way is to sit in a sleep loop. Code:
while true
do
if [ -f A.txt ]
then
sleep 10
else
break
fi
done
b.sh
avronius is right. Unless the file is a simple flag created with something like "touch" it could be not ready for processing. |
|
||||
|
This link might help you a bit:
scripting running every minute Have the script check for the existence of the file that you are referring to - if it finds the file, do stuff... - Avron |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|