switching to lower case also, since that's just the feisty meow way.
authorChris Koeritz <fred@gruntose.com>
Tue, 28 May 2013 18:17:46 +0000 (14:17 -0400)
committerChris Koeritz <fred@gruntose.com>
Tue, 28 May 2013 18:17:46 +0000 (14:17 -0400)
scripts/files/spaces_to_underscores.sh

index 69078b6c027b461f6803c1c7ee6dbad00e7ef125..40eda0375c0d6609666b0467ff88610fb485f9f3 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 while [ $# -gt 0 ]; do
   file="$1"; shift
-  newname="$(echo "$file" | tr -s ' ' '_' | tr -d "\\\~'," | sed -e 's/\([0-9]\)_\./\1./g' | sed -e 's/_-_/-/' )"
+  newname="$(echo "$file" | tr A-Z a-z | tr -s ' ' '_' | tr -d "\\\~'," | sed -e 's/\([0-9]\)_\./\1./g' | sed -e 's/_-_/-/' )"
   if [ "$file" != "$newname" ]; then
     # we've effected a name change, so let's actually do it.
     echo "moving '$file' => '$newname'  "