title: print the duplicate lines using the sed command?
body: <p>I am trying to print the duplicate lines in a file using the sed command.
  In a file I have the following contents:</p>
  
  <pre><code>hi
  hello
  hi
  how
  hello
  </code></pre>
  
  <p>how can I print the duplicate lines in this file using sed command??</p>
  
  <p>example: the output should be:</p>
  
  <pre><code>hi
  hello
  </code></pre>