From 16b444236170b9aa38a6d8ac65c9ef512e056b9a Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 4 Jan 2023 01:16:42 +0100 Subject: [PATCH] check-postfix-fatal-errors.sh: fix error parsing log-file if day of mont is lower than 10. --- check-postfix-fatal-errors.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-postfix-fatal-errors.sh b/check-postfix-fatal-errors.sh index db946e6..7952a1d 100755 --- a/check-postfix-fatal-errors.sh +++ b/check-postfix-fatal-errors.sh @@ -318,7 +318,7 @@ fi -_err_msg="$(grep -E "^$(LC_ALL="en_US.UTF-8" date +'%b %d ')" $MAIL_LOG | grep " fatal:")" +_err_msg="$(grep -E "^$(LC_ALL="en_US.UTF-8" date +'%b %d ' | sed -e 's/0\([0-9]\)/ \1/g')" $MAIL_LOG | grep " fatal:")" if [[ -n "$_err_msg" ]] ; then if $terminal; then