Created
December 14, 2019 20:32
-
-
Save JadenH/d185e48b37b929432ee043110aba5424 to your computer and use it in GitHub Desktop.
Recursively rename filenames from kebab case to pascal case
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/bash | |
files=$(find src -name '*.ts' -or -name '*.tsx') | |
for file in $files; do | |
path=$(dirname "$file") | |
filename=$(basename "$file" | sed -r 's/(-)([a-z])/\U\2/g') | |
mv "$file" "$path/$filename" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment