config/shell/functions/lowercase: refine queries
This commit is contained in:
parent
867f019928
commit
8f4fda1a1f
|
@ -462,10 +462,10 @@ else
|
||||||
alias f1='find -mindepth 1 -maxdepth 1'
|
alias f1='find -mindepth 1 -maxdepth 1'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lowercase_transliterate="y/A-Z /a-z-/"
|
lowercase() {
|
||||||
which perl-rename >/dev/null &&
|
#$(which perl-rename || echo rename) -iv 'y/A-Z /a-z-/' "$@"
|
||||||
alias lowercase="perl-rename -iv '$lowercase_transliterate'" ||
|
find "$@" -exec sh -c 'mv -iv {} "$(echo {} | tr "A-Z " "a-z-" | sed "s|---|_|;s|\.-|.|")" 2>/dev/null' \;
|
||||||
alias lowercase="rename -iv '$lowercase_transliterate'"
|
}
|
||||||
|
|
||||||
# TODO replace cp by rsync, automatically use compression for remote transfers
|
# TODO replace cp by rsync, automatically use compression for remote transfers
|
||||||
# rsync directory properly - suffix both dirs with / to act on contents
|
# rsync directory properly - suffix both dirs with / to act on contents
|
||||||
|
|
Loading…
Reference in New Issue