Skip to content

Instantly share code, notes, and snippets.

@markdouthwaite
Forked from mihow/load_dotenv.sh
Created September 2, 2020 06:40
Show Gist options
  • Save markdouthwaite/fe080b29927a4da15d027a721a916ba2 to your computer and use it in GitHub Desktop.
Save markdouthwaite/fe080b29927a4da15d027a721a916ba2 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