Skip to content

Instantly share code, notes, and snippets.

@n00dl3
n00dl3 / parse_dotenv.bash
Created June 16, 2020 11:08 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)