title: Multiple keyword grep where all keywords must be found
body: <p>I'm trying to find a better way to determine which files in a given directory contain all of a given set of search strings.  The way I'm currently doing it seems awkward.</p>
  
  <p>For example, if I want to find which files contain "aaa", "bbb", "ccc", and "ddd" I would do:</p>
  
  <pre><code>grep -l "aaa" * &gt; out1
  grep -l "bbb" `cat out1` &gt; out2
  grep -l "ccc" `cat out2` &gt; out3
  grep -l "ddd" `cat out3` &gt; out4
  cat out4
  rm out1 out2 out3 out4
  </code></pre>
  
  <p>As you can see, this seems clumsy. Any better ideas?</p>
  
  <p><strong>EDIT:</strong> I'm on a Solaris 10 machine</p>