Created
May 4, 2018 10:27
-
-
Save alekseypotapov-dev/a94be3b316b6dac06c8115e211f184dc to your computer and use it in GitHub Desktop.
Change spaces to underscore for all filenames in current folder
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
for f in *\ *; do mv "$f" "${f// /_}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for f in *; do mv "$f" "${f/foo/bar}"; done
# for all items in current directory replace all "foo" occurrences with "bar"