title: Bash script - Parallel unzip and waiting for ending
body: <p>I need to uncompress some archives and I'd like to speedup the process.
  Here my piece of script:</p>
  
  <pre><code>for archive in $path; do
  
      STEM=$(basename "${archive}" .gz)
      gunzip -c $archive &gt; $here/$STEM
  
  done
  
  for file in `ls "$here"`; do
       ... processing ...
  done
  </code></pre>
  
  <p>Is there a way to uncompress multiple (all) archives at once and wait for completation?</p>
  
  <p>In other words, I need something like that:</p>
  
  <pre><code>for archive in $path; do
  
      ... parallel unzip ...
  
  done
  
  WAIT
  
  for file in `ls "$here"`; do
       ... processing ...
  done
  </code></pre>
  
  <p>Thanks</p>