Created
April 29, 2017 16:05
-
-
Save dongkwan-kim/abe66a5317630e7718979106ee985d78 to your computer and use it in GitHub Desktop.
shell script to change snake_case to camelCase
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
#! /bin/bash | |
# usage bash toCamel.sh target.js | |
# snake_func -> snakeFunc | |
for i in $(seq 1 30) | |
do | |
cat $1 | sed -r 's/([a-z]+)_([a-z])([a-z]+)/\1\U\2\L\3/g' > temp | |
mv temp $1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idea: https://stackoverflow.com/a/34420162/1041470