title: how to pipe commands in ubuntu
body: <p>How do I pipe commands and their results in Ubuntu when writing them in the terminal. I would write the following commands in sequence - </p>
  
  <pre><code>$ ls | grep ab
  abc.pdf
  cde.pdf
  $ cp abc.pdf cde.pdf files/
  </code></pre>
  
  <p>I would like to pipe the results of the first command into the second command, and write them all in the same line. How do I do that ?</p>
  
  <p>something like</p>
  
  <pre><code>$ cp "ls | grep ab" files/
  </code></pre>
  
  <p>(the above is a contrived example and can be written as <code>cp *.pdf files/</code>)   </p>