Skip to content

Instantly share code, notes, and snippets.

@markdouthwaite
Created September 2, 2020 06:40
Show Gist options
  • Save markdouthwaite/5cc328fdec4f583432b238b16e55fb0e to your computer and use it in GitHub Desktop.
Save markdouthwaite/5cc328fdec4f583432b238b16e55fb0e to your computer and use it in GitHub Desktop.
A simple little `bash` script for loading environment variables from dotenv files. Based on [this](https://gist.github.com/mihow/9c7f559807069a03e302605691f85572)
if [ -f .env ]
then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment