Difference between revisions of "Set -e"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(16 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
+ | * https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html#index-set | ||
− | [[set]] -e or set -o errexit | + | [[set]] -e or [[set -o]] [[errexit]] |
-e Exit immediately if a command exits with a [[non-zero status]]. | -e Exit immediately if a command exits with a [[non-zero status]]. | ||
+ | |||
+ | set -eo [[pipefail]] | ||
+ | [[set -eu]] | ||
+ | [[set -euo pipefail]] | ||
+ | [[set -euox pipefail]] | ||
+ | [[set -Eeuxo pipefail]] | ||
== Related == | == Related == | ||
Line 11: | Line 18: | ||
* [[exit 0]] | * [[exit 0]] | ||
* [[usage]] | * [[usage]] | ||
+ | * [[SET SESSION AUTHORIZATION]] | ||
+ | * <code>[[set +b]]</code> | ||
+ | * <code>[[set +e]]</code> | ||
+ | * <code>[[set -E]]</code> | ||
+ | * <code>[[set -eu]]</code> | ||
+ | * [[bash -e]] | ||
+ | * [[continue-on-error:]] | ||
== See also == | == See also == | ||
+ | * {{set -o}} | ||
+ | * {{set -e}} | ||
* {{set}} | * {{set}} | ||
− | |||
[[Category:Bash]] | [[Category:Bash]] |
Latest revision as of 08:30, 25 October 2024
set -e or set -o errexit
-e Exit immediately if a command exits with a non-zero status.
set -eo pipefail set -eu set -euo pipefail set -euox pipefail set -Eeuxo pipefail
Related[edit]
- Errors
trap
- return
- exit 0
- usage
- SET SESSION AUTHORIZATION
set +b
set +e
set -E
set -eu
- bash -e
- continue-on-error:
See also[edit]
Advertising: