title: Minimal "Task Queue" with stock Linux tools to leverage Multicore CPU
body: <p>What is the best/easiest way to build a minimal task queue system for Linux using bash and common tools?</p>
  
  <p>I have a file with 9'000 lines, each line has a bash command line, the commands are completely independent.</p>
  
  <pre><code>command 1 &gt; Logs/1.log
  command 2 &gt; Logs/2.log
  command 3 &gt; Logs/3.log
  ...
  </code></pre>
  
  <p>My box has more than one core and I want to execute X tasks at the same time. I searched the web for a good way to do this. Apparently, a lot of people have this problem but nobody has a good solution so far.</p>
  
  <p>It would be nice if the solution had the following features:</p>
  
  <ul>
  <li>can interpret more than one command (e.g. <code>command; command</code>)</li>
  <li>can interpret stream redirects on the lines (e.g. <code>ls &gt; /tmp/ls.txt</code>)</li>
  <li>only uses common Linux tools</li>
  </ul>
  
  <p>Bonus points if it works on other Unix-clones without too exotic requirements.</p>