How python operates the shell command

  • purpose:

I want to invoke the shell script in python. The shell script has operations to receive input, and I want to enter these commands in python.

description: here is the execution of a .sh shell script, the main function is to have the relevant configuration.

here you need to enter the relevant commands configured by the script, and then execute the logic. How to do it in python?

Mar.03,2021

there are 1531 lines of code in ssr.sh. You need to analyze the case structure after line 1482.

the first command, you choose 1, you will install ShadowsockesR, that is, you will execute the Install_SSR function (in line 670).
then you can write the Install_SSR function into Python commands, or you can decompose these 15 functions into a small script, and then use Python's os.system (cmd) command to call the script.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b386cc-4069d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b386cc-4069d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?