X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2D4429DC816 for ; Fri, 6 Jan 2006 13:26:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61655-06 for ; Fri, 6 Jan 2006 13:26:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.195]) by postgresql.org (Postfix) with ESMTP id D7EBF9DC83B for ; Fri, 6 Jan 2006 13:26:47 -0400 (AST) Received: by xproxy.gmail.com with SMTP id i30so1936106wxd for ; Fri, 06 Jan 2006 09:26:48 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:organization:mime-version:content-type:content-transfer-encoding:x-mailer:x-mimeole:thread-index:message-id; b=KGtc+WYXbrOykAMVnlzHYklSDmbnFjnx6VufIylxCXg06OxvUSHgrvfCXayKHuZrG9hKGZbJC5mqKEjvWol1+QLBjHb8dsOJVOZ2xPMQLdiAEfmJdlEBEuLGJh4l6Wbst2cABf+MVIBEgQOqHD+sSHIVRVlHnKNsJyjprYFKhIY= Received: by 10.70.122.16 with SMTP id u16mr3396291wxc; Fri, 06 Jan 2006 09:26:47 -0800 (PST) Received: from sbew318anc22 ( [200.184.93.96]) by mx.gmail.com with ESMTP id h35sm14066059wxd.2006.01.06.09.26.46; Fri, 06 Jan 2006 09:26:47 -0800 (PST) From: "Bruno Almeida do Lago" To: Subject: Strange behavior Date: Fri, 6 Jan 2006 15:26:27 -0200 Organization: G&P MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcYS5lNUgaGfiqCRT9uT8jPfclqxHw== Message-ID: <43bea857.3c1aed03.4110.ffffd904@mx.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/289 X-Sequence-Number: 89234 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