title: Run python script after another is terminated
body: <p>I have a python script that takes several hours to complete. I usually run it as:</p>
  
  <pre><code>python myscript.py arg1 arg2 ... argN 2&gt; log.err &gt; log.out &amp;
  </code></pre>
  
  <p>I'd like to have a shell script that runs several time the same python script (with different parameters). This script has to start the second python script ONLY when the first one has terminated and so on. I think I should use PID of the processes and iteratively check using sleep within some while loops. Any suggestions? The scripts are executed in a remote machine so I have to put them in background in order the guarantee they keep executing even when I log out.</p>