Skip to content

Instantly share code, notes, and snippets.

@DrewDouglass
Created July 29, 2016 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrewDouglass/6a23702462f1f2364c01c5e920343dd8 to your computer and use it in GitHub Desktop.
Save DrewDouglass/6a23702462f1f2364c01c5e920343dd8 to your computer and use it in GitHub Desktop.
Bash script to replace spaces in filename with 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