title: Script to change basename with without changing extension in linux
body: <p>I have several files with <code>a.dat</code>, <code>a.txt</code>, <code>a.mp3</code>, <code>b.dat</code>, <code>b.txt</code>, <code>b.mp3</code>, <code>b.zip</code>, <code>b.rar</code>, <code>c.mp3</code> and so on.  I want to rename all files with basename "a" to basename "x".</p>
  
  <p>Such that files become <code>x.dat</code>, <code>x.txt</code>, <code>x.mp3</code>, <code>b.dat,</code>b.txt<code>,</code>b.mp3<code>,</code>b.zip<code>,</code>b.rar<code>,</code>c.mp3` and so on.</p>
  
  <p>In Linux this can be done via terminal but requires lot of typing. I want a script to do the task for me.</p>