Editing Set (Bash)
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 4: | Line 4: | ||
The <code>-e</code> option will cause a bash script to exit immediately when a command [[error handling|fails]]</code> | The <code>-e</code> option will cause a bash script to exit immediately when a command [[error handling|fails]]</code> | ||
− | + | * <code>[[set -e]] or set -o errexit </code> | |
* <code>[[set -x]] print every command that is executed and every variable that is set to the standard output. Useful to [[debug]] scripts.</code> | * <code>[[set -x]] print every command that is executed and every variable that is set to the standard output. Useful to [[debug]] scripts.</code> | ||
− | |||
− | |||
* <code>set -eo [[pipefail]] https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/</code> | * <code>set -eo [[pipefail]] https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/</code> | ||
* <code>[[set -euo]] [[pipefail]]</code> | * <code>[[set -euo]] [[pipefail]]</code> | ||
* <code>[[set -euox]] [[pipefail]]</code> | * <code>[[set -euox]] [[pipefail]]</code> | ||
− | |||
− | |||
− | * <code>[[set -eu]]</code> | + | |
− | * <code>[[set -o vi | + | *<code>[[set -eu]]</code> |
− | + | *<code>[[set -o vi]]</code> | |
− | * <code>[[set compatible]]</code> | + | *<code>[[set compatible]]</code> |
− | * <code>set -o [[history]] ([[Bash history]])</code> | + | *<code>set -o [[history]] ([[Bash history]])</code> |
* <code>set -o [[pipefail]]</code> | * <code>set -o [[pipefail]]</code> | ||
* <code>set -o errtrace</code> | * <code>set -o errtrace</code> | ||
Line 25: | Line 21: | ||
* <code>[[set -u]] error when performing [[parameter expansion]]</code> | * <code>[[set -u]] error when performing [[parameter expansion]]</code> | ||
− | |||
− | |||
− | + | [[set -m]] ([[Job control]]) | |
+ | |||
+ | [[set -o noclobber]] | ||
== Related terms == | == Related terms == | ||
− | |||
* <code>[[tset]]</code> | * <code>[[tset]]</code> | ||
* <code>[[trap]]</code> | * <code>[[trap]]</code> | ||
Line 40: | Line 35: | ||
* <code>[[set (vi)]]</code> | * <code>[[set (vi)]]</code> | ||
* <code>[[SET SESSION AUTHORIZATION]]</code> | * <code>[[SET SESSION AUTHORIZATION]]</code> | ||
− | |||
== Activities == | == Activities == |
Advertising: