title: Copy and Rename Multiple Files with Regular Expressions in bash
body: <p>I've got a file structure that looks like:</p>
  
  <pre><code>A/
      2098765.1ext
      2098765.2ext
      2098765.3ext
      2098765.4ext
        12345.1ext
        12345.2ext
        12345.3ext
        12345.4ext
  
  B/
      2056789.1ext
      2056789.2ext
      2056789.3ext
      2056789.4ext
        54321.1ext
        54321.2ext
        54321.3ext
        54321.4ext
  </code></pre>
  
  <p>I need to rename all the files that begin with <code>20</code> to start with <code>10</code>; i.e., I need to rename <code>B/2022222.1ext</code> to <code>B/1022222.1ext</code></p>
  
  <p>I've seen many of the other questions regarding renaming multiple files, but couldn't seem to make it work for my case. Just to see if I can figure out what I'm doing before I actually try to do the copy/renaming I've done:</p>
  
  <pre><code>for file in "*/20?????.*"; do
      echo "{$file/20/10}";
  done
  </code></pre>
  
  <p>but all I get is</p>
  
  <pre><code>{*/20?????.*/20/10}
  </code></pre>
  
  <p>Can someone show me how to do this?</p>