Created
February 19, 2020 14:05
-
-
Save aelindeman/ea919e05cc1aa5d5c6159f5fa20b7412 to your computer and use it in GitHub Desktop.
bash script to export all key=value pairs in a file as environment variables to the terminal
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
#!/usr/bin/env bash | |
exportall() { | |
export $(grep -v '^#' "${1:-.env}" | xargs) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment