$status
–
Exit Status
$status is the decimal exit status of the most recent command executed.
This is the same as POSIX variable $?.
Links
Examples
- Return from function with exit status 2 and print status
- Output:
1 2 3a() { return 2; } a echo $status12
BashSupport Pro is a Zsh IDE with support for $status – try it now!