Created
October 20, 2018 02:40
-
-
Save youngjuning/00f14403bfe32c2a7e2d909b356c355e to your computer and use it in GitHub Desktop.
js-jsx.sh
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 | |
oldsuffix="js" | |
newsuffix="jsx" | |
dir=$(eval pwd) | |
for file in $(ls $dir | grep .${oldsuffix}) | |
do | |
name=$(ls ${file} | cut -d. -f1) | |
mv $file ${name}.${newsuffix} | |
done | |
echo "change js to jsx successd!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment