From: Bruno Almeida do Lago <teolupus@gmail.com>
To: pgsql-general@postgresql.org
Subject: Strange behavior
Date: Fri, 6 Jan 2006 15:26:27 -0200
Message-ID: <43bea857.3c1aed03.4110.ffffd904@mx.gmail.com> (raw)
Hello my friends!
I was making a pretty simple script to export our databases, and found a
strange (funny) behavior of psql (or bash?).
[psql8@xxxx]$ psql -Atl | cut -d"|" -f1 | grep -v template
Db_1
Db_2
Db_3
Db_4
The databases name were changed due privacy reasons (our client database),
but as you can see the command worked.
Now, when I come with the bash script:
#!/bin/bash
imprime () {
echo `date +"%d/%m/%y %H:%M:%S |"` $*
}
BANCOS=`psql -Atl | cut -d"|" -f1 | grep -v template`
for BANCO in $BANCOS; do
imprime "Inicio do backup da base $BANCO"
done
[psql8@webix backup_psql8]$ ./backup.sh
psql: could not send startup packet: Broken pipe
Any clues????
Best Regards,
Bruno Almeida do Lago
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: teolupus@gmail.com
Subject: Re: Strange behavior
In-Reply-To: <43bea857.3c1aed03.4110.ffffd904@mx.gmail.com>
References: <43bea857.3c1aed03.4110.ffffd904@mx.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox