8

Tip #571   Change file extension revisited

And again about file extension changing.

There are two tips about this:
#27 - http://www.shell-fu.org/lister.php?id=27
#544 - http://www.shell-fu.org/lister.php?id=544

I'm happy to provide one more variant. It's up to you which one is the most useful.
function chext(){
  local fname
  local new_ext="$1"
  shift
  IFS=$'\n'
  for fname in $@
  do
    mv "$fname" "${fname%.*}.$new_ext"
  done
}

If you place this function into .bashrc, then you may use it like as follows:
chext new_ext *.old_ext
chext html `find ~ -iname "*.htm"`
find ~ -iname "*.htm" | xargs chext html