title: gnu parallel: Prefix output with hostname(s)
body: <p>Is it possible to prefix the output of gnu <code>parallel</code> when I run same command on multiple hosts?</p>
  
  <p>I have 10 worker machines in a worker-pool and any one of them could've picked up the job, I want to find out which worker picked it up by <code>grep</code>ing log files on all:</p>
  
  <pre><code>parallel --nonall -S host1,host2,host3 grep job_id_123 /var/log/my_log.log
  </code></pre>
  
  <p>prints something like:</p>
  
  <pre><code>initing job_id_123
  doing phase1 job_id_123
  doing phase2 job_id_123
  wrapping up job_id_123
  </code></pre>
  
  <p>What I want is to </p>
  
  <pre><code>host2: initing job_id_123
  host2: doing phase1 job_id_123
  host3: doing phase2 job_id_123
  host1: wrapping up job_id_123
  </code></pre>
  
  <p>I know I can do this:</p>
  
  <pre><code>parallel --nonall -S host1,host2,host3 "hostname &amp;&amp; grep job_id_123 /var/log/my_log.log"
  </code></pre>
  
  <p>but prefixing is what I was hoping for.</p>
  
  <p>I'm using <code>GNU parallel 20160422</code> on <code>Ubuntu precise (12.04.5 LTS)</code></p>