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 脚本。
如何才能做到这一点?
简直了[[ -f "$0" ]] && rm "$0"。可能想要防止写入失败等。
[[ -f "$0" ]] && rm "$0"