From 44e57df831bb1e42cee1d6d40119a94c43c5ad74 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 14 Aug 2020 00:03:32 -0600 Subject: [PATCH] func trapExit: cleanup printf formatting --- pilerBackup/pilerbackup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pilerBackup/pilerbackup.sh b/pilerBackup/pilerbackup.sh index 8b39610..ec54ff0 100755 --- a/pilerBackup/pilerbackup.sh +++ b/pilerBackup/pilerbackup.sh @@ -198,12 +198,12 @@ newline() { # same as exitError but for signal captures trapExit () { - printf "${err}[%s] -- [ERROR] 99: Caught signal --${norm}\n" \ - "$(stamp)" >> "$logFile" + printf "%s[%s] -- [ERROR] 99: Caught signal --%s\n" \ + "$err" "$(stamp)" "$norm" >> "$logFile" cleanup # note script completion with error - printf "${err}[%s] --- %s execution was terminated via signal ---${norm}\n" \ - "$(stamp)" "$scriptName" >> "$logFile" + printf "%s[%s] --- %s execution was terminated via signal ---%s\n" \ + "$err" "$(stamp)" "$scriptName" "$norm" >> "$logFile" exit 99 }