projects
/
errhandle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53aa7b7
)
document another cleanup method
author
Ian Kelling
<ian@iankelling.org>
Thu, 13 Apr 2017 10:00:35 +0000
(
03:00
-0700)
committer
Ian Kelling
<ian@iankelling.org>
Thu, 13 Apr 2017 10:00:35 +0000
(
03:00
-0700)
README
patch
|
blob
|
blame
|
history
diff --git
a/README
b/README
index 83214bf6653555c7692642aa66866873418f35df..78873d6d4f7f40b70f463512aff4fb6ec215f5f5 100644
(file)
--- a/
README
+++ b/
README
@@
-11,6
+11,9
@@
For scripts without any nested function calls, this is usually sufficient:
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+Cleanup commands or functions can be appended to the ERR trap after a
+semicolon within the single quotes.
+
Related: see my bash script template repo, at https://iankelling.org/git.
Please email me if you have a patches, bugs, feedback, or republish this