Skip to content

Instantly share code, notes, and snippets.

@pcktuts
Forked from mihow/load_dotenv.sh
Created May 24, 2021 10:23
Show Gist options
  • Save pcktuts/e3d26fbb30dfa8897936afe52fe7bae2 to your computer and use it in GitHub Desktop.
Save pcktuts/e3d26fbb30dfa8897936afe52fe7bae2 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