Last active
March 17, 2020 11:41
-
-
Save nexus166/8bd81e8095dfa72352386990cb2767a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| until [[ -z "$(find ${1:-.} -name '* *')" ]]; do | |
| find ${1:-.} -name "* *" -type d -print0 | while read -d '' f; do | |
| mv -fv "$f" "${f// /_}"; | |
| done; | |
| find ${1:-.} -name "* *" -type f -print0 | while read -d '' f; do | |
| mv -fv "$f" "${f// /_}"; | |
| done; | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment