Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Embed Python in a bash script
export FOO=100
python - <<END
import os
print "foo:", os.environ['FOO']
BAR=200 python - <<END
import os
print "bar:", os.environ['BAR']
# output:
# foo: 100
# bar: 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.