title: Read two files (text) and compare for common values and output the string?
body: <p>Question: I have two files one with list of serial number,items,price, location and other file has items. So i would like compare two files and printout the number times items are repeated in file1 with serial number. </p>
  
  <p>Text1 file will have </p>
  
  <p><img src="https://i.stack.imgur.com/btxHH.jpg" alt="enter image description here"></p>
  
  <p>Text2 file will have</p>
  
  <p><img src="https://i.stack.imgur.com/y91AO.jpg" alt="enter image description here"></p>
  
  <p>Output should be</p>
  
  <p><img src="https://i.stack.imgur.com/ZAnNw.jpg" alt="enter image description here"></p>
  
  <p>So the file1 is not formatted in proper order and file 2 is in order (line by line). </p>