title: How to pass command output as multiple arguments to another command
body: <p>I want to pass each output from a command as multiple argument to a second command, e.g.:</p>
  
  <pre><code>grep "pattern" input
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>file1
  file2
  file3
  </code></pre>
  
  <p>and I want to copy these outputs, e.g:</p>
  
  <pre><code>cp file1  file1.bac
  cp file2  file2.bac
  cp file3  file3.bac
  </code></pre>
  
  <p>How can I do that in one go? Something like:</p>
  
  <pre><code>grep "pattern" input | cp $1  $1.bac
  </code></pre>