Created
March 6, 2014 16:31
-
-
Save azalea/9393605 to your computer and use it in GitHub Desktop.
Replace file extensions in git repository
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 | |
oldext=".md" | |
newext=".markdown" | |
for file in $(git ls-files | grep ${oldext}\$); do | |
echo processing $file... | |
filename="${file%.*}" | |
git mv $file ${filename}$newext | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment