python bash escape(转义)

在python中调用bash接口,一般使用os.system, commands.getstatusoutput或者os.popen

如果command中遇到$,  !, " 等特殊字符需要手动转义。且不同语句之间最后使用分号(;)分隔。



你可能感兴趣的:(python,command,bash)