Strange behavior - Mailing list pgsql-general

From Bruno Almeida do Lago
Subject Strange behavior
Date
Msg-id 43bea857.3c1aed03.4110.ffffd904@mx.gmail.com
Whole thread Raw
Responses Re: Strange behavior  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Indexes works only on miss
Next
From: Trent Shipley
Date:
Subject: Relational Inheritance Features.