Skip to content

Instantly share code, notes, and snippets.

@youngjuning
Created October 20, 2018 02:40
Show Gist options
  • Save youngjuning/00f14403bfe32c2a7e2d909b356c355e to your computer and use it in GitHub Desktop.
Save youngjuning/00f14403bfe32c2a7e2d909b356c355e to your computer and use it in GitHub Desktop.
js-jsx.sh
#!/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