Reputation: 914
I need to execute the bash script Do_Regr.sh with the following arguments in a linux server:
./Do_Regr.sh -i Testlist_Regression.in -m 135.24.237.167 -g
How do I run the above in a Python script using os.system() ?
Upvotes: 2
Views: 1269
Reputation: 67988
import subprocess
subprocess.Popen("./Do_Regr.sh -i Testlist_Regression.in -m 135.24.237.167 -g",shell=True)
This should do it.Make sure your python script is also in the same directory or use os.chdir
to get there.
Upvotes: 1