Skip to content

Instantly share code, notes, and snippets.

@cdolek
Last active June 15, 2017 19:08
Show Gist options
  • Save cdolek/38d7f69f5ae24144d548b798ec81e5d5 to your computer and use it in GitHub Desktop.
Save cdolek/38d7f69f5ae24144d548b798ec81e5d5 to your computer and use it in GitHub Desktop.
Rename spaces in the files and directory names found in a directory to _ underscore
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