Programming Tips - How can I rename a bunch of files to lowercase?

Date: 2014oct26 Product: mmv Language: bash OS: Linux Q. How can I rename a bunch of files to lowercase? eg all .jpg's in a folder. A. This can be done by writing a fairly short shell script. But quickly hacked together scripts often don't handle edge cases like spaces in filenames, I/O errors, disk full etc. There is a command that can do it and I recommend using it. For example, rename all .JPG's to lowercase:
mmv \*.JPG \#l1.jpg ^ The l means lowercase (use u for uppercase) ^^^^^^ Pattern of files to select
See its man page for more info.