Created
June 3, 2022 15:23
-
-
Save theothermattm/7b7001cbe50594672311a48ca4f33a8c to your computer and use it in GitHub Desktop.
Bash: Load environment vars from .env file
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
# Load Environment Variables from .env | |
if [ -f .env ]; then | |
export $(cat .env | grep -v '#' | sed 's/\r$//' | awk '/=/ {print $1}' ) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment