Created
July 22, 2015 20:06
-
-
Save omsai/ce15450a0652bb65cf7e to your computer and use it in GitHub Desktop.
Recursively replace spaces with dashes for GNU Make.
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
| # Replace all spaces in file names with dashes. | |
| find . -name "* *" -type f | \ | |
| while IFS= read -r f ; do \ | |
| mv "$f" "$(dirname "$f")/$(basename "$f" | tr ' ' -)" ; \ | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment