Skip to content

Instantly share code, notes, and snippets.

@hoangnvhybrid
Forked from mihow/load_dotenv.sh
Created July 4, 2022 03:30
Show Gist options
  • Save hoangnvhybrid/6a32f8cd70f1de5b37a409d4205f8b1c to your computer and use it in GitHub Desktop.
Save hoangnvhybrid/6a32f8cd70f1de5b37a409d4205f8b1c 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