Last active
August 29, 2015 14:25
-
-
Save MatthewRDodds/18362df68b09f23aff6f to your computer and use it in GitHub Desktop.
Batch rename files in folder
This file contains hidden or 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
# Should rename test_controller.coffee to test.coffee | |
for old in ./*_controller.coffee; do | |
new=$(echo $old | sed -e 's/_controller//') | |
echo "moving $old to $new" | |
mv -v "$old" "$new" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment