Skip to content

Instantly share code, notes, and snippets.

View alphanetEX's full-sized avatar
thunder stealth

Anderson A. alphanetEX

thunder stealth
View GitHub Profile
@mihow
mihow / load_dotenv.sh
Last active October 22, 2024 08:26
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a