如何在启动 Python 进程后退出 bash 脚本?

How to exit a bash script after it starts a Python process?

我有一个 Python 程序可以从 GitHub 存储库更新自身。当我激活更新过程时,Python 脚本运行 updater.bash 脚本并自行终止。 bash 脚本更新程序,然后再次运行。但是它保持 运行 尽管我把 exit 0 放在更新程序的末尾。因此,每次更新都会创建另一个 bash 占用更多资源的脚本。

如何在运行 Python 脚本后终止脚本?

exec python ... 用 python 程序替换 bash。

参见:help exec