Skip to content

Instantly share code, notes, and snippets.

@iwillspeak
Last active August 6, 2021 10:43
Show Gist options
  • Save iwillspeak/64db8513a206bdf81ea7f4bd25418ed8 to your computer and use it in GitHub Desktop.
Save iwillspeak/64db8513a206bdf81ea7f4bd25418ed8 to your computer and use it in GitHub Desktop.
Shows how to export .env data to the current environment
#! /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