Skip to content

Instantly share code, notes, and snippets.

@mihow
Created December 19, 2018 00:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mihow/51aa5ee90a21a153921db63882183f9e to your computer and use it in GitHub Desktop.
Save mihow/51aa5ee90a21a153921db63882183f9e to your computer and use it in GitHub Desktop.
Set environment vars from a file
# Ignores commented out lines and handles spaces
# https://stackoverflow.com/questions/19331497/set-environment-variables-from-file-of-key-pair-values
export $(grep -v '^#' .env | xargs -d '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment