Skip to content

Instantly share code, notes, and snippets.

@DrewDouglass
Created July 29, 2016 18:23
Show Gist options
  • Select an option

  • Save DrewDouglass/6a23702462f1f2364c01c5e920343dd8 to your computer and use it in GitHub Desktop.

Select an option

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