title: unix match multiple patterns in different lines
body: <p>If I have a unix file contains the following:</p>
  
  <pre><code>aaaa12
  bbbb34
  ssss56
  qqqq78
  oooo90
  aaaa01
  bbbb23
  </code></pre>
  
  <p>I want to search for different patterns in different lines. in the above example if i want to print the lines that contain the two patterns (aaaa) and (bbbb) the output should be:</p>
  
  <pre><code>aaaa12
  bbbb34
  aaaa01
  bbbb23
  </code></pre>
  
  <p>In the same order as the original file
  What is the suitable unix command to do this</p>
  
  <p>I tried egrep "aaaa | bbbb" but the output was:</p>
  
  <pre><code>aaaa12
  aaaa01
  bbbb34
  bbbb23
  </code></pre>