Howto change the extension of multiple files

This happens to me when I'm importing photographs, I end up with files called .JPG or .jpeg and I prefer .jpg.

for file in *.JPG
do
  mv $file `basename $file .JPG`.jpg
done

The command rename does this same thing nicely, but knowing the for loop way can be more useful sometimes...and if you didn't know about rename, then I guess that would be useful too.
rename .JPG .jpg *.JPG

https://t.co/AGeihMALAv configuring grub2 with EFI Fri Sep 13 05:20:01 +0000 2019

I published a Thing on @thingiverse! https://t.co/IYpRyEb7Hz #thingalert Tue Jul 23 19:27:57 +0000 2019

Nokogiri install on MacOSX https://t.co/v3An0miW9L Fri Jul 12 15:06:49 +0000 2019

HTML email with plain mailer plugin on Jenkins https://t.co/Z6FSDMDjy8 Thu Jul 11 21:07:25 +0000 2019

git sparse checkout within Jenkinsfile https://t.co/tcL7V8mzFK Thu Jul 11 20:40:53 +0000 2019