Created
October 23, 2019 22:42
-
-
Save ueokande/d606791f00788d6e74d9f6a3020fa568 to your computer and use it in GitHub Desktop.
dot.separated.case <---> SNAKE_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
# Converts between dot.separated.case and SNAKE_CASE (app caps). | |
# dot.separated.case to SNAKE_CASE | |
# | |
# echo 'mysql.user' | dots_to_snake | |
# => MYSQL_USER | |
# | |
alias prop_to_env="tr '[a-z].' '[A-Z]_'" | |
# SNAKE_CASE to dot.separated.case | |
# | |
# echo MYSQL_USER | snake_to_dots | |
# => mysql.user | |
# | |
alias env_to_prop="tr '[A-Z]_' '[a-z].'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment