3 windows windows-command-prompt
使用bash,执行的最后一件事的退出代码存储在$?shell 变量中:
foo
bar
echo $? # prints exit code of `bar`
baz
echo $? # prints exit code of `baz`
Run Code Online (Sandbox Code Playgroud)
如果我cmd在 Windows 下运行脚本,是否有等效的方法来获取此值?(注意:诉诸于诸如运行 Python 脚本然后调用其自己的库函数之类的方法并不是我在这里所追求的。)
| 归档时间: |
|
| 查看次数: |
3569 次 |
| 最近记录: |