From: Chris Koeritz Date: Sat, 6 Apr 2013 20:55:07 +0000 (-0400) Subject: made this squeeze multiple spaces into single underscore. X-Git-Tag: 2.140.90~1024 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=d8637b3a74b6579addb5f853d321772d1e2c74ba;p=feisty_meow.git made this squeeze multiple spaces into single underscore. --- diff --git a/scripts/files/spaces_to_underscores.sh b/scripts/files/spaces_to_underscores.sh index eb56f7bb..07b8a1c0 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 -s ' ' '_' | tr -d "\~'" | sed -e 's/\([0-9]\)_\./\1./g' )" if [ "$file" != "$newname" ]; then # we've effected a name change, so let's actually do it. echo "moving '$file' => '$newname' "