The UNIX and Linux Forums  


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 -->
  #1 (permalink)  
Old 09-25-2008
nua7 nua7 is offline
Registered User
  
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 353
help in wait or sleep command

Hi All,
I have a script which runs 3 scripts. The first script creates two files. The other two scripts should run only when the files are created.

I tried the following for loop , but it is not working. Can someone please help me.



Code:
while [ ! -e script3.lck && script4.lck ]; do
# Sleep until file does exists/is created
sleep 1
done