am new in python. am create a python script that return a string hello world. and am create a shell script. add a call from shell to python script.
- i need to pass arguments from shell to python.
- i need to print the value return from python in the shell script.
this is my code
shellscript1.sh
#!/bin/bash
# script for tesing
clear
echo "............script started............"
sleep 1
python python/pythonScript1.py
exit
pythonScript1.py
#!/usr/bin/python
import sys
print "Starting python script!"
try:
sys.exit('helloWorld1')
except:
sys.exit('helloWorld2')