Difference between revisions of "Script to Convert to Lowercase Filenames"
From zen2
m (1 revision) |
|
(No difference)
| |
Latest revision as of 08:45, 25 July 2013
#!/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
From here
