From c6c18aa161eb8c0ed061b4a33aaa8ba95dcbae49 Mon Sep 17 00:00:00 2001 From: Ciro Scognamiglio Date: Fri, 13 Jul 2012 14:07:01 +0200 Subject: [PATCH] small fix to avoid unnecessary warning messages --- scripts/ple-backup-cleanup.cron | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ple-backup-cleanup.cron b/scripts/ple-backup-cleanup.cron index afc0597..bb7a89f 100755 --- a/scripts/ple-backup-cleanup.cron +++ b/scripts/ple-backup-cleanup.cron @@ -37,6 +37,8 @@ function backup_db { # $3: Date function backup_all_dbs { for i in $(psql -qtAF '|' -U postgres -l 2> /dev/null) ; do + NF=$(echo $i | awk -F '|' '{print NF}') + if [ $NF -ne 6 ]; then continue; fi DBNAME=$(echo $i | cut -d '|' -f 1) DBUSER=$(echo $i | cut -d '|' -f 2) case $DBNAME in -- 2.43.0