title: Display duplicate lines in two different files
body: <p>I have two files and I would like to display the duplicate line. I tried this but it doesn't work : </p>
  
  <p><code> cat id1.txt | while read id; do grep "$id" id2.txt; done </code></p>
  
  <p>I am wondering if there are any other way to display the duplicate lines in the file.
  Both of my 2 files contain list of ids.
  Thank you.</p>