From d52bee6b047ffcb2ea12df14053a928978d60e2e Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 13 Apr 2017 03:00:35 -0700 Subject: [PATCH] document another cleanup method --- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index 83214bf..78873d6 100644 --- 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 -- 2.25.1