projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75b42e9
)
made this squeeze multiple spaces into single underscore.
author
Chris Koeritz
<fred@gruntose.com>
Sat, 6 Apr 2013 20:55:07 +0000
(16:55 -0400)
committer
Chris Koeritz
<fred@gruntose.com>
Sat, 6 Apr 2013 20:55:07 +0000
(16:55 -0400)
scripts/files/spaces_to_underscores.sh
patch
|
blob
|
history
diff --git
a/scripts/files/spaces_to_underscores.sh
b/scripts/files/spaces_to_underscores.sh
index eb56f7bb6db7839fb4d1b3f9165c0825d6e1784c..07b8a1c0c5f75841b931d61930c802b45cc099af 100644
(file)
--- 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' "