I want to run multiple shell scripts with os.system("") | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I want to run multiple shell scripts with os.system("")

I want to run os.system("sshpass -p xxxxxx ssh root@192.xxx.x.x source ./my.sh; rest") My command work on the commandline without any problem but when I try to run it through os.system it gives an error saying rest is not found. Rest is a shell function. So the running command on the command line is: Sshpass -p xxxxxx root@192.xxx.x.x "source ./my.sh; rest" See the double quotes on between source and reset fixes the issue on the commandline but I can't do two double quotes inside os.system

5th Jun 2019, 10:59 PM
Karzan
1 Answer
0
google subprocess
5th Jun 2019, 11:13 PM
Flash