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.
More Related Contents:
- Enhancement of unix script [closed]
- how to get the time after two minutes [closed]
- Execute python script while open terminal
- Running shell command and capturing the output
- Is there a simple way to get rid of junk values that come when you SSH using Python’s Paramiko library and fetch output from CLI of a remote machine?
- How to escape os.system() calls?
- Some Unix commands fail with ” not found”, when executed using Python Paramiko exec_command
- How to save a Python interactive session?
- Run Python script without Windows console appearing
- Seeing escape characters when pressing the arrow keys in python shell
- Run multiple python scripts concurrently
- How do I pipe a subprocess call to a text file?
- Is there any simple way to benchmark Python script?
- Python – Activate conda env through shell script
- How to implement common bash idioms in Python? [closed]
- Call Python script from bash with argument
- Why is an MD5 hash created by Python different from one created using echo and md5sum in the shell?
- python getoutput() equivalent in subprocess [duplicate]
- Running a bash script from a cronjob fails with “No such file or directory”
- How do I add tab completion to the Python shell?
- When to use Shell=True for Python subprocess module [duplicate]
- Implement an interactive shell over ssh in Python using Paramiko?
- How to run a python file using cron jobs
- How to repeat last command in python interpreter shell?
- How do you install lxml on OS X Leopard without using MacPorts or Fink?
- Why does subprocess.Popen() with shell=True work differently on Linux vs Windows?
- A Python script that activates the virtualenv and then runs another Python script?
- Calling a Python function from a shell script
- run python script directly from command line
- Command line execution in different folder