summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-30 00:27:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-30 00:27:44 +0300
commit2d0967349bd3581a8582d7284d85488404b098ea (patch)
treeef0b144f28f1c5c96871d34cfd0d7b0f17fba865
parentboost.md: publish on the web (diff)
downloadnotes-2d0967349bd3581a8582d7284d85488404b098ea.tar.gz
notes-2d0967349bd3581a8582d7284d85488404b098ea.zip
bash.md: `errexit`
-rw-r--r--bash.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/bash.md b/bash.md
index 6f729a0..b50b2fa 100644
--- a/bash.md
+++ b/bash.md
@@ -51,3 +51,15 @@ It doesn't affect expansion (see below) though.
unset -v 'arr["$i"]' # Also rejected.
# An insightful discussion on the topic: https://lists.gnu.org/archive/html/help-bash/2016-09/msg00020.html.
+
+### `errexit`
+
+#### Do
+
+ bar_output="$( bar )"
+ foo "$bar_output"
+
+#### Don't
+
+ foo "$( bar )" # With `errexit`, foo will still get executed.
+ # I don't know why.