Skip to content

Instantly share code, notes, and snippets.

@iwillspeak
Last active Aug 6, 2021
Embed
What would you like to do?
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