Created
March 14, 2019 09:59
-
-
Save eirenik0/e297a0298624907d29e5c4cc827ebe7f to your computer and use it in GitHub Desktop.
Load ENV variables from .env file using `dotenv` package
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
#!/usr/bin/env bash | |
IFS=$'\n' | |
for line in $(cat .env); do | |
if [[ $line != \#* ]] ; then | |
eval 'export $line' | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment