Last active
December 13, 2017 16:34
-
-
Save elhoyos/423944d18a914f3abebc776fa2b0fa54 to your computer and use it in GitHub Desktop.
Load environment variables
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
function loadenv() { | |
. "$1" ; export $(cut -d= -f1 "$1") | |
} | |
export -f loadenv |
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
$ (loadenv ~/credentials/postgres.env ; psql) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment