Loverit.sh
Da WikiSitech.
Versione del 30 gen 2009 alle 17:13 di Mazzotti (discussione | contributi)
- !/bin/sh
- lowerit
- convert all file names in the current directory to lower case
- only operates on plain files--does not change the name of directories
- will ask for verification before overwriting an existing file
for x in `ls`
do
if [ ! -f $x ]; then
continue
fi
lc=`echo $x | tr '[A-Z]' '[a-z]'`
if [ $lc != $x ]; then
mv -i $x $lc
fi
done
- !/bin/sh
- upperit
- convert all file names in the current directory to upper case
- only operates on plain files--does not change the name of directories
- will ask for verification before overwriting an existing file
for x in `ls`
do
if [ ! -f $x ]; then
continue
fi
lc=`echo $x | tr '[a-z]' '[A-Z]'`
if [ $lc != $x ]; then
mv -i $x $lc
fi
done