Skip to content

Instantly share code, notes, and snippets.

@mammuth
Created December 17, 2018 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mammuth/db16ec00baf91cabee0e8a2dc46bba6e to your computer and use it in GitHub Desktop.
Save mammuth/db16ec00baf91cabee0e8a2dc46bba6e to your computer and use it in GitHub Desktop.
Read a certain .env variable in bash
DATABASE_NAME=$(cat .env | grep DATABASE_NAME | sed -E 's/(.*)=(.*)/\2/' | xargs);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment