Tuesday, March 16, 2010

shell script to rename all UPPERCASE files to lowercase

for f in *; do
g=`expr "xxx$f" : 'xxx\(.*\)' | tr '[A-Z]' '[a-z]'`
mv "$f" "$g"
done

No comments: