python calls the shell command, where grep-v does not match the comment line that begins with / /, but two more backslashes are added during the python run. Please take a look at it.
pdb prints out the "definition string" of this string, so it's right here. One slash becomes two slashes, no problem. If there is a problem with your command execution, you can check your popen-related code below. It is usually better not to use os.popen, and subprocess.popen.
Yes, there is a problem with the execution result. The original intention here is obviously that if this line is a / / comment line, it will not be grep, but the line that starts with / / will still be grep
.now there is a binary program shown in the following figure. Generally, I enter. itool daily25.cfg directly into the interface, and then choose the corresponding input according to my own needs. Now I want to call the script with python instead. The in...
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 releva...
how can git reset only return the version of the git repository to a certain version without affecting the workspace and the staging area? with such a rollback, all the new things in the workspace are gone ...
when the flask application is deployed in ubuntu, the server gunicorn command starts normally, and Internal Server Error, occurs when starting in supervisor,systemd,upstart and other ways. ...
call the interface of python in the shell script, but python API prints the relevant information to the screen through the logging of python. I don t know how to get these logging information in shell. Please advise. This is what the code says: impor...
I want to get the output of the script in real time through subprocess here is my script < H2 > test_echo.py < H2 > import time for i in range (10): print(i) time.sleep(0.5) < hr > here is the read script: < H2 > script name get_output.py < H...
Can convert logs to json using rules directly through the configuration file? if it doesn t work, can I use a custom script to input it as a log and output as a json conversion? did not find this information, ask for help, thank you! ...