Rename all the file extenstions in a directory
From thelinuxwiki
Rename all the file extenstions in a directory(JPG to jpg in this example):
for file in *.JPG ; do mv $file `echo $file | sed 's/\(.*\.\)JPG/\jpg/'` ; done