Created
December 17, 2018 10:54
-
-
Save mammuth/db16ec00baf91cabee0e8a2dc46bba6e to your computer and use it in GitHub Desktop.
Read a certain .env variable in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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