Skip to content

Instantly share code, notes, and snippets.

@ronbee
Forked from mihow/load_dotenv.sh
Created December 21, 2023 03:06
Show Gist options
  • Select an option

  • Save ronbee/3035fb26b15db4b9f4871821d285b37e to your computer and use it in GitHub Desktop.

Select an option

Save ronbee/3035fb26b15db4b9f4871821d285b37e 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