From: Don Armstrong Date: Fri, 25 Apr 2008 20:59:51 +0000 (+0000) Subject: * ditch leading _ at the end X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8ef2d80e7297f7b5cf19f7bc40ff6d091fe4d9be;p=bin.git * ditch leading _ at the end --- diff --git a/sanitize_filename b/sanitize_filename index 19737a2..13623ba 100755 --- a/sanitize_filename +++ b/sanitize_filename @@ -25,7 +25,7 @@ while [ $1 != '--' ]; do done; shift; if [ "$ANIME_CUT" == 0 ]; then - rename 's/\s+/\_/g; s/[^\w\d.]/\_/g; s/^_+//g; s/_$//g; $_ = lc($_); s/\_+/\_/g; s/\_\././' "$@" + rename 's/\s+/\_/g; s/[^\w\d.]/\_/g; s/_$//g; $_ = lc($_); s/\_+/\_/g; s/\_\././; s/^_+//g;' "$@" else - rename 's/\[[^\]]+\]//g; s/\([^\)]+\)//g; s/^_+//; s/\s+/\_/g; $_ = lc($_); s/[_-]+/\_/g; s/\_\././' "$@" + rename 's/\[[^\]]+\]//g; s/\([^\)]+\)//g; s/\s+/\_/g; $_ = lc($_); s/[_-]+/\_/g; s/\_\././; s/^_+//;' "$@" fi; \ No newline at end of file