Skip to content

Instantly share code, notes, and snippets.

@qodx
Forked from mihow/load_dotenv.sh
Created December 29, 2021 15:17
Show Gist options
  • Save qodx/9d854c54d29dbeec1b84f778cf67f82e to your computer and use it in GitHub Desktop.
Save qodx/9d854c54d29dbeec1b84f778cf67f82e to your computer and use it in GitHub Desktop.
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment