Skip to content

Instantly share code, notes, and snippets.

@ilyakhov
Forked from mihow/load_dotenv.sh
Created November 29, 2021 20:32
Show Gist options
  • Save ilyakhov/07b5049f371ad53c16f1a199f5b70a4c to your computer and use it in GitHub Desktop.
Save ilyakhov/07b5049f371ad53c16f1a199f5b70a4c 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