Skip to content

Instantly share code, notes, and snippets.

@riccardopedrielli
Created October 22, 2021 16:34
Show Gist options
  • Save riccardopedrielli/6a3787fd0d6ea5af69bcc42843eaf2cf to your computer and use it in GitHub Desktop.
Save riccardopedrielli/6a3787fd0d6ea5af69bcc42843eaf2cf to your computer and use it in GitHub Desktop.
Set environment variables from file in bash
if [ -r "${ENV_FILE}" ]; then
set -o allexport
source "${ENV_FILE}"
set +o allexport
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment