Skip to content

Instantly share code, notes, and snippets.

@sirmews
Created January 2, 2018 05:47
Show Gist options
  • Save sirmews/0793db29d0686bf2016aa8fcd036e0c1 to your computer and use it in GitHub Desktop.
Save sirmews/0793db29d0686bf2016aa8fcd036e0c1 to your computer and use it in GitHub Desktop.
Convert all spaces to underscore with bash
for name in *; do mv "$name" "${name// /_}"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment