Created
December 2, 2012 19:39
-
-
Save hannic/4190599 to your computer and use it in GitHub Desktop.
JPGtojpg - regex used by sed command
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
#!/bin/sh | |
# regular expression syntax used by the sed command (this syntax is described in more detail in “Regular Expressions Unfettered”) | |
for i in *.JPG ; do | |
mv "$i" "$(echo $i | sed 's/\.JPG$/.x/')" | |
mv "$(echo $i | sed 's/\.JPG$/.x/')" "$(echo $i | sed 's/\.JPG$/.jpg/')" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment