On Tue, 15 Jul 2003 20:35:15 -0500
Chris <[EMAIL PROTECTED]> wrote:
> At one time a long ways back someone posted, I think it was a small
> script file to change the case of file extensions, ie..MP3 to .mp3.
> Does anyone have that laying around? I've been googling and found a
> few, but none seem to work correctly.
>
> Thanks
> Chris
Or, to change *all* extensions to lowercase:
(assuming you are in the directory you want to do this)
#/bin/bash
for i in *
do
name=`echo $i|cut -d '.' -f 1`
ext=".`echo $i|cut -d '.' -f 2|tr [A-Z] [a-z]`"
echo "$i : $name$ext"
# mv "$i" "$name$ext"
done
Assuming that your filenames don't have '.' in the name other than to
denote extension.
Todd
--
The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no warrants shall issue, but upon probable cause,
supported by oath or affirmation, and particularly describing the place
to be searched, and the persons or things to be seized.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com