At 04:12 PM 4/4/00 CDT, you wrote:
>Hello,
>
>I was wondering if there was a way to rename files in Linux that are upper
>case to the same name only in lower case?
>
>I have about 400 files that were renamed to upper case when I FTP'ed them to
>the server and I need a quick way to make them lower case.
>
>If anyone can offer any help I would appreciate it.
>
>Thanks,
>Kevin
>
Here are a couple of scripts that I came accross that work.
This on does a single file:
# !/bin/bash
#
# Script to convert file names to lower case.
#
mv $1 `echo $1 | tr "[A-Z]" "[a-z]" `
This one does a directory:
# !/bin/bash
#
# Script to convert file names to lower case.
#
for i in *
do
echo $i
mv $i `echo $i | tr "[A-Z]" "[a-z]" `
done
Both could use some inprovment to check if the lowercase name alread
exhists...
Mikkel
--
Do not meddle in the affairs of dragons,
for you are crunchy and taste good with ketchup.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.