Shows how to export .env data to the current environment
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 | |
# 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