No python, no fancy stuff, nothing but plain old bash:

        for i in *; do
                j=`echo $i | tr '[A-Z]' '[a-z]'`
                if [ "$i" != "$j" ]; then
                        mv $i $j
                fi
        done

Or on a single line:

for i in *; do j=`echo $i | tr '[A-Z]' '[a-z]'`; if [ "$i" != "$j" ]; 
then mv $i $j; fi; done

Phil.


Reply via email to