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 1: | Line 1: | ||
− | + | The <code>-e</code> option will cause a bash script to exit immediately when a command fails | |
− | + | set -eo [[pipefail]] https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ | |
− | + | set -euxo [[pipefail]] | |
− | |||
− | + | set -eu | |
+ | [[set -o vi]] | ||
+ | set -o [[history]] ([[Bash history]]) | ||
+ | set -o [[pipefail]] | ||
+ | set -u error when performing [[parameter expansion]] | ||
− | + | set -x print every command that is executed and every variable that is set to the standard output. Useful to [[debug]] scripts. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Related terms == | == Related terms == | ||
− | * <code>[[ | + | * <code>[[debian-sa1]]</code> |
* <code>[[tset]]</code> | * <code>[[tset]]</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
Line 46: | Line 21: | ||
== See also == | == See also == | ||
− | |||
* {{Bash}} | * {{Bash}} | ||
[[Category:IT]] | [[Category:IT]] |
Advertising: