title: Name files in a directory after other files in a different directory
body: <p>I am on a GNU/Linux machine. I have a number of files in a directory <code>dir1</code> such as:</p>
  <pre><code>dir1/file_01.txt
  dir1/file_02.txt
  dir1/file_03.txt
  dir1/file_04.txt
  dir1/file_05.txt
  </code></pre>
  <p>Another directory <code>dir2</code> has other files such as:</p>
  <pre><code>dir2/text_01.txt
  dir2/text_02.txt
  dir2/text_03.txt
  dir2/text_04.txt
  dir2/text_05.txt
  </code></pre>
  <p>And I want to rename files in <code>dir2</code> to be <code>file_01.txt, ..., file_05.txt</code> such that <code>text_01.txt</code> is renamed <code>file_01.txt</code>, ..., <code>text_02.txt</code> is renamed <code>file_05.txt</code>.</p>