Last active
August 6, 2021 10:43
-
-
Save iwillspeak/64db8513a206bdf81ea7f4bd25418ed8 to your computer and use it in GitHub Desktop.
Shows how to export .env data to the current environment
This file contains hidden or 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 | |
# this sub-shell constrains the scope of the injected variables | |
( | |
export $(xargs <<EOF | |
Foo=hello | |
Bar=world | |
EOF | |
) | |
echo ${Foo} ${Bar} | |
) | |
echo "Foo is now '${Foo}'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment