Skip to content

Instantly share code, notes, and snippets.

@alecarg alecarg/

Created Oct 30, 2019
What would you like to do?
mv recursively (to avoid files not being moved if folders don't exist)
tmp="$2"; tmp="${tmp: -1}"
[ "$tmp" != "/" ] && dir="$(dirname "$2")"
[ -a "$dir" ] ||
mkdir -p "$dir" &&
mv "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.