Skip to content

Commit 47e9eb8

Browse files
author
Andrew Wong
committed
fix double spaces
1 parent c5f3e8e commit 47e9eb8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bulkrename

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
find "$1" -depth | while read line; do
66
dir="$(dirname "$line")"
77
old="$(basename "$line")"
8-
new="$(echo $old | tr ' ' '_'\
9-
| tr -d '()[]{},?!' | tr -d "'"\
10-
| tr '[[:upper:]]' '[[:lower:]]'\
11-
| sed 's/__/_/g'\
12-
| sed 's/_-_/-/g')"
8+
new="$(echo $old | tr ' ' '_' \
9+
| tr -d '()[]{},?!' | tr -d "'" \
10+
| tr '[[:upper:]]' '[[:lower:]]' \
11+
| sed 's/_-_/-/g' | sed 's/__/_/g')"
1312
[[ "$old" != "$new" ]] && mv -iv "$dir/$old" "$dir/$new"
1413
done

0 commit comments

Comments
 (0)