From b66e8733e153a75a451733ee9368340d926787bd Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Wed, 12 Apr 2023 13:54:40 +0200 Subject: [PATCH] show a single line only on skipped db type --- check_clientbackup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/check_clientbackup.sh b/check_clientbackup.sh index 031f6ee..3baa29e 100755 --- a/check_clientbackup.sh +++ b/check_clientbackup.sh @@ -150,11 +150,14 @@ else fi echo ">>> Summary of database backup actions:" - cat $logfile | grep "__[A-Z][A-Z]*__" | grep '__DB__' | filterColor + cat $logfile | grep '__DB__' | filterColor | cut -f 1 -d ' ' | sort -u | while read -r dbprefix + do + ( grep "$dbprefix SKIP" $logfile || grep "$dbprefix " $logfile ) | cut -f 2- -d ':' + done echo echo ">>> Summary of transfer actions:" - cat $logfile | grep "__[A-Z][A-Z]*__" | grep -E '__(BACKUP|PRUNE|REPO|VERIFY)__' | filterColor + cat $logfile | grep -E '__(BACKUP|PRUNE|REPO|VERIFY)__' | filterColor echo sShort="$sShort - OK: $iOK ... Errors: $iError" -- GitLab