title: Wait for "git clone" to finish in bash
body: <p>I have a sequential script in which there is a git clone.  I would like to make sure that the actual git process is finished before executing the next step.
  I tried</p>
  
  <pre><code>git clone https://github.example.com/Sample/Example.git &amp; export PID=${!} | while [[ ( -d /proc/$PID ) &amp;&amp; ( -z `grep zombie /proc/$PID/status` ) ]]; do sleep 1; done
  </code></pre>
  
  <p>and various other ways but could not manage how to wait until the actual git clone is done.  Any hint on this one please?</p>