title: Optimize images in directory using multiple CPU cores
body: <p>I have several PNG images in a directory and I'm using <code>optipng</code> to optimize and reduce image size. The problem is that it takes too long to optimize all files.</p>
  
  <p>I have a quad core processor and I noticed that <code>optipng</code> was using only a single core 
  when I optimize the directory.</p>
  
  <p>This is the code I'm using:</p>
  
  <pre><code>ls -1 | while read line
  do 
      optipng -o7 "$line"
  done
  </code></pre>
  
  <p>Is it possible to execute <code>optipng</code> for four different files in parallel while reading a directory?</p>