Created
September 2, 2016 21:05
-
-
Save mLuby/e1157dfe8434450da9f8016fd519e728 to your computer and use it in GitHub Desktop.
rename files en-masse
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
IFS=$'\n'; # change delimiter so it works on all but newline filenames | |
for file in $(find ./ -name '*.js'); | |
do mv "${file}" "${file}x" # file%jsx removes jsx from end of file | |
done | |
for file in $(find ./ -name '*spec.jsx'); | |
do mv "${file}" "${file/unit.spec.jsx/spec.js}" # file%jsx removes jsx from end of file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment