Skip to content

Instantly share code, notes, and snippets.

@HT2Knock
Forked from mihow/load_dotenv.sh
Last active July 3, 2024 18:45
Show Gist options
  • Save HT2Knock/7e95ecb666f10b4ee85d8495681cce03 to your computer and use it in GitHub Desktop.
Save HT2Knock/7e95ecb666f10b4ee85d8495681cce03 to your computer and use it in GitHub Desktop.
Load environment variables from dotenv / .env file in Bash
if [ -f .env ]
then
export $(grep -v '^#' .env | xargs)
fi
@HT2Knock
Copy link
Author

Load .env to current shell !! Ignore comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment