$status  –  Exit Status

$status is the decimal exit status of the most recent command executed. This is the same as POSIX variable $?.

Examples

Return from function with exit status 2 and print status
1
2
3
a() { return 2; }
a
echo $status
Output:
1
2
BashSupport Pro 是一款支持 status** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款