title: comparing two files diff awk else
body: <p>Could you please quickly help me with this? I have two files with 1 columns in each file. I need to compare fileA to fileB and find out which items in FileA are already in FILEB and print them out to another file.So basically like to find out which name they have in common.</p>
  
  <p>so I have something like this</p>
  
  <pre><code>FILEA
  
  MATT.1
  HANNA.1
  OTTOO.2
  MARK.2
  SAM.3
  
  FILEB
  
  SAM.3
  MATT.1
  JEFF.6
  ALI.8
  </code></pre>
  
  <p>The result file should be </p>
  
  <pre><code>SAM.3
  MATT.1
  </code></pre>
  
  <p>I was thinking of writing a shell script cat one file and do a line by line comparison, but there must a better and easier way to do this using one of many commands. Can you help?</p>
  
  <p>Regards</p>