title: Batch mv or rename in bash script - append date as a suffix
body: <p>After much searching and trial and error, I'm unable to do a batch <code>mv</code> or <code>rename</code> on a directory of files.  What I'd like to do is move or rename all files in a directory so that the <code>mv</code>'d or <code>rename</code>d file has <code>$date (+ '%Y%d%m')</code> added to the original suffix.</p>
  
  <p>All the original files have unique prefixes but are either <code>.xml</code> or <code>.txt</code> so I'd like to go from <code>org_prefix.org_suffix</code> -> <code>org_prefix.org_suffix.DATE</code></p>
  
  <p>I've tried this: </p>
  
  <pre><code>$ mv /directory/* /directory/*$(date (+ '%Y%m%d') 
  </code></pre>
  
  <p>but always get <code>/directory/*.actualdate' is not a directory</code> error.</p>
  
  <p>I've tried this: </p>
  
  <pre><code>$ for f in *; do mv $ $f.$(date +'_%m%d%y'); done 
  </code></pre>
  
  <p>but I get <code>mv: cannot stat '$'; No such file or directory</code></p>
  
  <p>Lastly, I've even tried this: </p>
  
  <pre><code>$ rename 's/*/.test/' * 
  </code></pre>
  
  <p>just to see if I could change all the files to <code>org_prefix.test</code> but nothing happens (no errors, nada, zip)</p>
  
  <p>Any help greatly appreciated.</p>