title: Using sed to print the lines starting with two different patterns
body: <p>I am already using the following <code>sed</code> command to print the lines starting with a certain word (e.g. A), however, couldn't figure out how to use this command to print the lines that start either with A or B. </p>
  
  <pre><code>sed -n '/A/p' 1.txt &gt; 2.txt
  </code></pre>