-
-
Save ganobrega/2771ac130fb46b1a212b6b15f0fccb26 to your computer and use it in GitHub Desktop.
Parse a .env (dotenv) file directly using BASH
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
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment