Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个 shell 命令在做什么?
trap 'sudo kill -9 -- -$$' EXIT
$$
-$$
--
所以在退出时trap将杀死脚本的所有子进程。
trap
§ 内部变量