Skip to content

Instantly share code, notes, and snippets.

@T2Knock
Forked from mihow/load_dotenv.sh
Last active July 3, 2024 18:45
Show Gist options
  • Save T2Knock/7e95ecb666f10b4ee85d8495681cce03 to your computer and use it in GitHub Desktop.
Save T2Knock/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
@T2Knock
Copy link
Author

T2Knock commented Jul 20, 2023

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