From 6182e4c763afdadeb0f232c5257f233dfee970b3 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 15 Oct 2015 13:15:32 +0200 Subject: =?UTF-8?q?Apply=20patch=20from=20Martin=20W=C3=BCrtele=20to=20han?= =?UTF-8?q?dle=20multi-line=20output=20by=20psql=20-l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backup-postgres | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup-postgres b/backup-postgres index 5779cef..5ed7ceb 100755 --- a/backup-postgres +++ b/backup-postgres @@ -30,7 +30,7 @@ DATE=`date "+%Y%m%d-%H%M%S"` CLIENTBASE=/srv/www/vhosts SYSBASE=/var/backups/local/pg -sudo -u postgres psql -l -t | awk '$1 != "" {print $1}' | +sudo -u postgres psql -l -t | awk '$1 != "" && $1 != "|" {print $1}' | while read db; do if [ "$db" = "template0" -o "$db" = "template1" ] ; then continue; -- cgit v1.2.3