bash:output:check_exit_status
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bash:output:check_exit_status [2021/01/26 14:52] – peter | bash:output:check_exit_status [2021/01/26 14:58] (current) – [Exit Status from a piped command - using PIPESTATUS] peter | ||
---|---|---|---|
Line 24: | Line 24: | ||
---- | ---- | ||
- | ===== Exit Status from a piped command - using PIPESTATUS ===== | + | ===== Exit Status from a piped command - use PIPESTATUS ===== |
- | What if you want the exit status of one command from a pipeline? | + | What if you want the exit status of one command from a pipeline? |
+ | |||
+ | If you want the last command' | ||
+ | |||
+ | If you want some other command' | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | In the case of Zsh, it's lower-cased pipestatus). | ||
+ | |||
+ | </ | ||
Say you want the exit status of grep in the following: | Say you want the exit status of grep in the following: |
bash/output/check_exit_status.1611672754.txt.gz · Last modified: 2021/01/26 14:52 by peter