self-destruct.sh

来自「Shall高级编程」· Shell 代码 · 共 21 行

SH
21
字号
#!/bin/bash# self-destruct.shkill $$  # Script kills its own process here.         # Recall that "$$" is the script's PID.echo "This line will not echo."# Instead, the shell sends a "Terminated" message to stdout.exit 0   # Normal exit? No!#  After this script terminates prematurely,#+ what exit status does it return?## sh self-destruct.sh# echo $?# 143## 143 = 128 + 15#             TERM signal

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?