Skip to content

Instantly share code, notes, and snippets.

@NKjoep
Created March 18, 2011 15:09
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 NKjoep/876226 to your computer and use it in GitHub Desktop.
Save NKjoep/876226 to your computer and use it in GitHub Desktop.
This simple bash script will rename all the files in the current directory: all lowercase, spaces to _ , minus - to _
#!/bin/bash
rename 'y/A-Z/a-z/' *
rename 'y/ /_/' *
rename 'y/-/_/' *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment