title: Grep for multiple patterns over multiple files
body: <p>I've been googling around, and I can't find the answer I'm looking for.</p>
  
  <p>Say I have a file, <code>text1.txt</code>, in directory <code>mydir</code> whose contents are:</p>
  
  <pre><code>one
  two
  </code></pre>
  
  <p>and another called <code>text2.txt</code>, also in <code>mydir</code>, whose contents are:</p>
  
  <pre><code>two
  three
  four
  </code></pre>
  
  <p>I'm trying to get a list of files (for a given directory) which contain all (not any) patterns I search for.  In the example I provided, I'm looking for output somewhere along the lines of:</p>
  
  <pre><code>./text1.txt
  </code></pre>
  
  <p>or </p>
  
  <pre><code>./text1.txt:one
  ./text1.txt:two
  </code></pre>
  
  <p>The only things I've been able to find are concerning matching any patterns in a file, or matching multiple patterns in a single file (which I tried extending to a whole directory, but received grep usage errors).</p>
  
  <p>Any help is much appreciated.  </p>
  
  <p>Edit-Things I've tried</p>
  
  <pre><code>grep "pattern1" &lt; ./* | grep "pattern2" ./*
  </code></pre>
  
  <p>"ambiguous redirect"</p>
  
  <pre><code>grep 'pattern1'|'pattern2' ./*
  </code></pre>
  
  <p>returns files that match either pattern</p>