Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Forked from mihow/load_dotenv.sh
Last active May 19, 2020 09:29
Show Gist options
  • Save mortymacs/b717f30ea8424a6538179f44ca5a9a15 to your computer and use it in GitHub Desktop.
Save mortymacs/b717f30ea8424a6538179f44ca5a9a15 to your computer and use it in GitHub Desktop.
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(grep -v '^#' .env | xargs)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment