I have a shell script inside of which I am calling a python script say new.py:
#!/usr/bin/ksh
python new.py
Now this new.py is something like -
if not os.path.exists('/tmp/filename'):
print "file does not exist"
sys.exit(0)
If the file does not exits then the python script returns but the shell script continue execution. I want the shell script also to stop at that point if the file does nt exits and my python script exits.
Please suggest how can I capture the return in shell script to stop its execution further.