assigning value to shell variable using a function return value from Python

You can print your value in Python, like this:

print fooPy()

and in your shell script:

fooShell=$(python fooPy.py)

Be sure not to leave spaces around the = in the shell script.

Leave a Comment