dot

packages and services management
Log | Files | Refs | README

commit c842e7a5e7a95f37fcfdbba241b6cfdb785764eb
parent 84aa8f3a4d2e7c735edf690b5893fc4da4f3a413
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 23 Feb 2018 00:24:59 +0100

use - instead of _!

Diffstat:
Mbin/mv-sane | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bin/mv-sane b/bin/mv-sane @@ -5,8 +5,7 @@ find . -mindepth 1 | while IFS='' read -r path do new="$(dirname "$path")/$(basename "$path" | - tr '\t #&;*?<>|"()[]{}\\-=+'\' _ | - sed -e 's/__*/_/g' -e 's/^_//' -e 's/_$//')" + tr -s '\t #&;*?<>|"()[]{}\\_=+'\' - | sed 's/^-//; s/-$//')" - [ "$new" = "$path" ] || mv "$path" "$new" + [ "$path" = "$new" ] || mv "$path" "$new" done