diff options
Diffstat (limited to '.local/bin/mvtr')
-rwxr-xr-x | .local/bin/mvtr | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.local/bin/mvtr b/.local/bin/mvtr index 9f0f680d..a4fa90a0 100755 --- a/.local/bin/mvtr +++ b/.local/bin/mvtr @@ -7,6 +7,7 @@ # pass awk script as argument trick from url: # https://unix.stackexchange.com/questions/282503/right-syntax-for-awk-usage-in-combination-with-other-command-inside-xargs-sh-c +# -exec can't replace -execdir here, see cli notes for the -exec way find "$@" -depth -execdir sh -c 'mv -nvT -- "$2" "$(echo "$2" | awk "$1" )"' shell '{gsub(/\/-+/,"/");gsub(/ +/,"_");gsub(/_*-+_*/,"-");print tolower($0)}' '{}' \; # for test |