Skip to content

Instantly share code, notes, and snippets.

@nmnp
Created January 1, 2020 22:55
Show Gist options
  • Save nmnp/4eb2ff4e5c74cde5f0e25950b88ccd2b to your computer and use it in GitHub Desktop.
Save nmnp/4eb2ff4e5c74cde5f0e25950b88ccd2b to your computer and use it in GitHub Desktop.
set environment variables from .env file
#GNU systems
export $(grep -v '^#' .env | xargs -d '\n')
# BSD systems
export $(grep -v '^#' .env | xargs -0)
#link
https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-value-pairs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment