X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Ffiles%2Fspaces_to_underscores.sh;h=66823e199dd4de80a3b3aa8a5f9c019f68ce56ba;hb=efdd0611b7c22bbd7b337130ecb44918f9d429a1;hp=ebfbcff6a14fcda2e61ca5ae0919c4c66d50b0cd;hpb=9b7838e4daba218fe52c800af282fe05d24554a1;p=feisty_meow.git diff --git a/scripts/files/spaces_to_underscores.sh b/scripts/files/spaces_to_underscores.sh index ebfbcff6..66823e19 100644 --- a/scripts/files/spaces_to_underscores.sh +++ b/scripts/files/spaces_to_underscores.sh @@ -12,7 +12,7 @@ fi while [ $# -gt 0 ]; do file="$1"; shift - newname="$(echo "$file" | tr ' ' '_' | tr -d "'" | sed -e 's/\([0-9]\)_\./\1./g' )" + 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' "