title: Filtering file entries based on another file as match condition
body: <p>Really beginner of bash and scripting so sorry if it is very basic question to You.</p>
  
  <p>I have file1 with ~1 million rows contain two fields in every row.
  I have file2 with ~270.000 rows, single entry in every rows. It is common with file1 field 1.</p>
  
  <p>The goal is to have a filtered list from the file1 (keep the filed1 and field2 entries) based on file2 entries.</p>
  
  <p>Example:</p>
  
  <p><code>file1</code></p>
  
  <pre><code>1 A
  
  2 B
  
  3 C
  
  4 C
  
  5 D
  
  6 A
  
  7 G
  
  8 K
  
  122 F
  
  .
  
  .
  
  56677 A
  
  .
  
  7272727272 A
  
  1.000.000 A
  
  File2:
  
  1
  
  2
  
  3
  
  9
  
  122
  
  56677
  
  7272727272
  </code></pre>
  
  <p>I want filter the first column based on file2 and output should be like this:</p>
  
  <pre><code>1 A
  
  2 B
  
  3 C
  
  122 F
  
  56677 A
  
  7272727272 A
  </code></pre>