From 53da07ad6ff2ee1880fa53bcdf00fc18c923665b Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 2 May 2011 15:16:52 +0000 Subject: Handle continuation lines in psql -l output git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@479 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- backup-pg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup-pg b/backup-pg index 79274c2..671afc5 100755 --- a/backup-pg +++ b/backup-pg @@ -64,7 +64,7 @@ else exit 1 fi -$SUDO psql $PORT -l -t | awk '$1 != "" {print $1}' | +$SUDO psql $PORT --list --tuples-only | grep -v '^.*:' | awk '$1 != "" {print $1}' | while read db; do if [ "$db" = "template0" -o "$db" = "template1" ] ; then continue; -- cgit v1.2.3