Created
December 21, 2018 23:39
-
-
Save david-pm/9c3416d4cc5802ec9a9f8e101d306519 to your computer and use it in GitHub Desktop.
a sed script to convert camelcase and or pascalcase to snakecase
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
# sed -i -f convert_to_snakecase __yourfile__ | |
# | |
# to run this within in vim: | |
# %s/[A-Z]/_\L&/g | %s/\<_//g | |
s/[A-Z]/_\L&/g; s/\b_//g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment