title: Running asynchronous shell commands inside a synchronous one, i.e. wait for result
body: <p>I'd like to run commands asynchronously, but to be able to get the prompt back, only when all commands are finished</p>
  
  <p>For example</p>
  
  <p>I'd like to run something like this
  sleep 1 &amp; sleep 7 &amp; sleep 3 &amp; sleep 4</p>
  
  <p>and have the shell released after 7 seconds</p>
  
  <p>For instance, I'll use this with multiple curls for downloading simultaneously, and get the prompt back when everything would be downloaded</p>