subprocess.run和subprocess.call有什么区别?因为在下面的代码中使用哪一个并不重要,所以我得到了相同的结果。我正在尝试用PyCharm CE编写一个程序来更改我的MacBook的MAC地址,这是我到目前为止拥有的代码:
subprocess.run("ifconfig en0| grep ether", shell=True) #this shows me the current MAC
我正在尝试从Python中运行这个命令git status -vv | awk 'NR>5 {print $0}'。但我不能让awk命令起作用。以下是我的测试结果:# Your branch is ahead of master by 2 commits.## modified: file2当我从终端