Created
August 1, 2021 22:38
-
-
Save openglfreak/14b505758b05a7cb7112265f77c17954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w_try_mv() | |
{ | |
mv_src="${*: -2:1}" | |
mv_dst="${*: -1:1}" | |
if [ "${mv_src^^}" != "${mv_dst^^}" ]; then | |
w_try mv "$@" | |
return | |
fi | |
w_try mv "${@: -$#:$#-2}" "$mv_src" "${mv_src}_" | |
w_try mv "${@: -$#:$#-2}" "${mv_src}_" "${mv_dst}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment