Created
January 19, 2012 19:47
-
-
Save tce/1642135 to your computer and use it in GitHub Desktop.
Rename files in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rename from *.JPG to *.jpg | |
for x in *.JPG; do mv "$x" "${x/.JPG}".jpg; done | |
rename 's/\.JPG/\.jpg/' *.JPG | |
#strip spaces | |
rename 's/ //' *.JPG | |
# upper to lower case | |
rename 'y/A-Z/a-z/' *.JPG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment