title: passing stdout to grep as pattern argument
body: <p>I'm pretty sure someone already asked this question but I couldn't manage to find it, anyway, here it is :</p>
  
  <p>let's say we have a file :</p>
  
  <pre><code>$cat file
  AAA 123
  BBB 456
  CCC 789
  </code></pre>
  
  <p>And I'd like to do some thing like :</p>
  
  <pre><code>printf "BBB\nAAA\n" | grep - file
  </code></pre>
  
  <p>where "-" is the standard output. But grep does not consider it as stdout.</p>
  
  <p>and get </p>
  
  <pre><code>BBB 456
  AAA 123
  </code></pre>
  
  <p>It should also work with many patterns instead of <code>echo "BBB"</code>. Instead of echo I have few pipes and a list as an output.</p>