Skip to content

Instantly share code, notes, and snippets.

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