I have written a program in shell. And inside this shell script, I am calling a python script. That is working fine. I want my python script to return the output to the shell script. Is it possible? (I didnt get any such way on google). Can you please tell how to do that in case it is possible?
test.sh
#!/bin/bash
python call_py.py
and python script (call_py.py
)
#!/usr/bin/python
if some_check:
"return working"
else:
"return not working"
How do I return from python and catch in shell?