You may not know this, but when you browse to add photos to MySpace on Linux, it specifies *.jpg and a handful of other formats. This is perfectly fine in a Windows world, but MySpace must not remember hat Linux filenames are CASE SENSITIVE. So when I import photos to a folder and they’re all named IMG_0101.JPG, etc, they won’t show up in the MySpace upload form. So those 50 photos you want to upload of your last vacation won’t show up in the window.
So you try to use mv to rename them. Yes, mv will due globbing on filenames, but rename will do regexps.
cd ~/photos/dirwithphotos
rename 's/JPG$/jpg/' *.JPG
Done.
You can go further with it, too. For instance, if I want to rename the files, since they’re all named IMG_0203.jpg
cd ~/photos/icanhaslinux
rename 's/^IMG/icanhaslinux/' *
rename 's/JPG$/jpg' *
Easy enough, right?
You can do more, since you have the full suite of regexps available, but that’s just a start.
Grab the regexp cheatsheet and you can do even more unnecessarily complicated things!
woohoo!