diff --git a/cutname.sh b/cutname.sh index 405e11b..97f31f3 100755 --- a/cutname.sh +++ b/cutname.sh @@ -5,12 +5,9 @@ set -x while (( "$#" )) do - FILENAME=${1%%-*} - - mv ${1} ${FILENAME} + mv ${1} ${1%%-*} shift - cd - done #./cutname.sh /*-*