Skip to content

Instantly share code, notes, and snippets.

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