comm = ['/bin/find', '/', '-type', 'f', '-name', 'passwd', '|',
'xargs', 'grep', '-Ein', '-A', '1', '\'root "|zhangsan\'', '|', 'grep', '"}"']
comms = ' '.join(comm)
out = subprocess.call(comms, shell=True)
comm = ['/bin/find', '/', '-type', 'f', '-name', 'passwd', '|',
'xargs', 'grep', '-Ein', '-A', '1', '\'root "|zhangsan\'', '|', 'grep', '"}"']
comms = ' '.join(comm)
out = subprocess.call(comms, shell=True)
本文标题:python shell 引号 管道符 处理
本文链接:https://www.haomeiwen.com/subject/bcpfwctx.html
网友评论