title: Shell script wait till process completes
body: <p>I have a process</p>
  
  <pre><code>"verifyEmail"
  I run this in script as verifyEmail 0 1000
  </code></pre>
  
  <p>Now How do I wait until this process is finished executing before moving on to next instruction in shell script ? It takes more than 60 mins for verifyEmail to run</p>
  
  <p>I tried</p>
  
  <pre><code>while ! checkprocess "verifyEmail"; do   ##Checkprocess is a function which returns 0 or 1
  sleep 60                                 ## based on process present or not
  done 
  </code></pre>