title: Check if PID exists in Bash
body: <p>I want to stall the execution of my BASH script until a process is closed (I have the PID stored in a variable). I'm thinking</p>
  
  <pre><code>while [PID IS RUNNING]; do
  sleep 500
  done
  </code></pre>
  
  <p>Most of the examples I have seen use /dev/null which seems to require root. Is there a way to do this without requiring root?</p>
  
  <p>Thank you very much in advance!</p>