美文网首页
python shell 引号 管道符 处理

python shell 引号 管道符 处理

作者: 虚心的锄头 | 来源:发表于2019-11-22 11:02 被阅读0次
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