Created
January 1, 2020 22:55
-
-
Save nmnp/4eb2ff4e5c74cde5f0e25950b88ccd2b to your computer and use it in GitHub Desktop.
set environment variables from .env file
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
#GNU systems | |
export $(grep -v '^#' .env | xargs -d '\n') | |
# BSD systems | |
export $(grep -v '^#' .env | xargs -0) | |
#link | |
https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment