On Tue, Apr 04, 2000 at 04:12:28PM -0500, K Old wrote:
> 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.
#!/bin/sh
#
## -------- convert upper to lower case ---------
ls * | while read f
do
if [ -f $f ]; then
if [ "$f" != "`echo \"$f\" | tr A-Z a-z`" ]; then
#Note that 'This' will overwrite 'this'!
mv -iv "$f" "`echo \"$f\" | tr A-Z a-z`"
fi
fi
done
#--- eof
--
Hal B
[EMAIL PROTECTED]
--
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.