title: Matching pattern present in one column should replace with the entry of second file
body: <p>I have two files
  file1.txt</p>
  <pre><code>ID  AB  AC  AD  AE
  L   5   6   7   5
  M   4   5   6   4
  O   2   4   6   8
  P   7   9   6   5
  Q   7   8   6   5
  </code></pre>
  <p>file2.txt</p>
  <pre><code>AB  BB
  AC  HG
  AD  ZH
  AE  BE
  </code></pre>
  <p>result_file.txt</p>
  <pre><code>ID  BB  HG  ZH  BE
  L   5   6   7   5
  M   4   5   6   4
  O   2   4   6   8
  P   7   9   6   5
  Q   7   8   6   5
  </code></pre>
  <p>How I can get this output. I know that sed can be used for substitution, but how I can apply it on multiple entries.</p>