Mixed Case Directory Names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is untested, but Try this:

#!/bin/sh
if [ -z $1 ]; then
echo "You didn't specify a directory!";
exit 1;
elif [ -d $1 ]; then
tf=/tmp/renamer.$$;
rm -f $tf;
ls *[A-Z]* | awk '{print "mv", $1, tolower($1)}' > $tf;
source $tf;
exit 0;
else echo "$1 is not a directory!";
exit 2;
fi




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux