我使用 pexpect 生成bash shell,然后使用 sendline 在 bash shell 中执行其他进程。
有什么方法可以获取生成的 bash shell 的 pid 吗? 如何获取我在 bash 中启动的进程的 pid?
python pid pexpect
任何人都可以告诉我有什么区别
cmd1 & cmd2 & ...
和
cmd1 && cmd2 && ....
在shell脚本中.如果它们的执行不同,我可能知道每个命令是如何实际执行的.
linux shell
linux ×1
pexpect ×1
pid ×1
python ×1
shell ×1