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>[[ | + | *<code>set -eo [[pipefail]] https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/</code> |
+ | *<code>set -euxo [[pipefail]]</code> | ||
− | * <code> | + | *<code>set -eu</code> |
− | * <code>set - | + | *<code>[[set -o vi]]</code> |
− | * <code>[[set | + | *<code>[[set compatible]]</code> |
− | * <code>[[ | + | *<code>set -o [[history]] ([[Bash history]])</code> |
− | * <code> | + | *<code>set -o [[pipefail]]</code> |
− | * <code> | + | *<code>set -o errtrace</code> |
− | * <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 39: | Line 33: | ||
* <code>[[set (python)]]</code> | * <code>[[set (python)]]</code> | ||
* <code>[[set (vi)]]</code> | * <code>[[set (vi)]]</code> | ||
− | |||
− | |||
== Activities == | == Activities == |
Advertising: