title: Renaming multiple files using parameter unix
body: <p>I have a rename script below <code>rename.sh</code>. I want to introduce <code>a variable</code> such that I can pass a date argument when executing the script like<br /><code>./rename.sh 20151103</code><br /> such that <code>20151103</code> replaces <code>20140306</code> in the script.</p>
  
  <pre><code>for f in *.CDR*; do
    echo mv "$f" "${f/-20140306/-0-20140306}"
  done
  </code></pre>
  
  <p>Thinking of automating this as I don't want to manually edit the script each time i'm doing a rename. Any other method will be highly welcomed.</p>