tro*_*skn 15
bash,而不是shell。(Bash 只是几种可能的 shell 之一。虽然它是最常见的)
它表示执行的最后一个命令的退出代码。
请参阅此处:http : //tldp.org/LDP/abs/html/othertypesv.html和此处http://tldp.org/LDP/abs/html/exit-status.html
小智 5
对于支持此 shell 变量“$?”的 shell 包含最近执行的命令的返回码。
因此,如果您正在运行程序“abc”,它在退出时返回 1
$ echo $?
Run Code Online (Sandbox Code Playgroud)
给出“1” - 返回码。
它不仅在 bash 中可用,其他 shell 也具有此功能。
| 归档时间: |
|
| 查看次数: |
6264 次 |
| 最近记录: |