Python 奇怪的子进程行为

Python 奇怪的子进程行为,python,subprocess,Python,Subprocess,下列产出: subprocess.call(["find", ".", "-exec", "sh", "-c", "echo testFirst", ";"]) subprocess.call(["find", ".", "-exec", "sh", "-c", "echo testSecond", ";"], shell=True) subprocess.call(["find . -exec sh -c 'echo testThird' \\;"], shell=True) subproc

下列产出:

subprocess.call(["find", ".", "-exec", "sh", "-c", "echo testFirst", ";"])
subprocess.call(["find", ".", "-exec", "sh", "-c", "echo testSecond", ";"], shell=True)
subprocess.call(["find . -exec sh -c 'echo testThird' \\;"], shell=True)

subprocess.call(["find", ".", "-exec", "sh", "-c", "touch testFirst", ";"])
subprocess.call(["find", ".", "-exec", "sh", "-c", "touch testSecond", ";"], shell=True)
subprocess.call(["find . -exec sh -c 'touch testThird' \\;"], shell=True)
并且只创建testFirst和testThird文件

对这种行为的解释是什么

我假设testFirst、testSecond、testThird的输出以及正在创建的三个文件

当您传递shell=True时,Popen需要一个字符串参数,而不是 名单


为什么需要前4个参数?这不是我的实际代码,我只是缩小了范围来演示这个问题。
testFirst
testFirst
testFirst
.
./test.py
./data
testThird
testThird
testThird
.
./test.py
./testFirst
./data