Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1D6FD6354DA for ; Thu, 2 Apr 2009 23:53:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 90212-04 for ; Thu, 2 Apr 2009 23:53:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f167.google.com (mail-ew0-f167.google.com [209.85.219.167]) by mail.postgresql.org (Postfix) with ESMTP id 72554634505 for ; Thu, 2 Apr 2009 23:53:39 -0300 (ADT) Received: by ewy11 with SMTP id 11so1195484ewy.19 for ; Thu, 02 Apr 2009 19:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/wtrOqYfmTvEAX9d/1Cr895yctBqmTgQs2GNmpFxzoY=; b=hE32cfeIcH7s0TD1Dp8e9bsOPXArzbsD2K1PEQ3M+gW6hz4BDN1KHu/WqAncXdjlmP GJWMkuV5M8ETxwBEKFHFkFPY8Kl3BlZPpS2TTp9rk+zcG0sGMUDyWKLTC6BJWO+FdwXx XdfhUXLBjUMVARZUzlP5KkCHq9y4CgDtHgU+c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=w5OUdxAqCSCa9/RJtY7Q1iiHkD8e/C7k7JF6iM21+iXc0yyLfEHhV4QblWGZwg8H4p xhOq5nJaIHjqbz/LttzxZCkrEeqd5Q9Ef7EhrSUgv3h+nTqJ7XQj5W0iZ3tLt1YMxZNN +ngJ/4LnRBV6Lugzm1pBRBckCQlds00oLRuFY= MIME-Version: 1.0 Received: by 10.210.38.17 with SMTP id l17mr126783ebl.45.1238727217223; Thu, 02 Apr 2009 19:53:37 -0700 (PDT) In-Reply-To: References: Date: Thu, 2 Apr 2009 20:53:37 -0600 Message-ID: Subject: Re: How would I get rid of trailing blank line? From: Scott Marlowe To: Tena Sakai Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL=0.003 X-Spam-Level: X-Archive-Number: 200904/27 X-Sequence-Number: 32373 On Thu, Apr 2, 2009 at 3:33 PM, Tena Sakai wrote: > Hi Everybody, > > I am using postgres 8.3.4 on linux. > I often use a line like: > =A0 psql -tf query.sql mydatabase > query.out > > -t option gets rid of the heading and count > report at the bottom.=A0 There is a blank line > at the bottom, however.=A0 Is there any way to > have psql not give me that blank line? Tired of those blank lines in your text files? Grep them away: psql -tf query.sql mydatabase | grep -v "^$" > query.out > > Thank you for your help. > > Regards, > > Tena Sakai > tsakai@gallo.ucsf.edu > --=20 When fascism comes to America, it will be the intolerant selling it as diversity.