agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: How would I get rid of trailing blank line?
Date: Thu, 2 Apr 2009 20:53:37 -0600
Message-ID: <dcc563d10904021953v53412679qdfdc8ba29589a098@mail.gmail.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C04E84A65@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C04E84A65@egcrc-ex01.egcrc.org>

On Thu, Apr 2, 2009 at 3:33 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> I am using postgres 8.3.4 on linux.
> I often use a line like:
>   psql -tf query.sql mydatabase > query.out
>
> -t option gets rid of the heading and count
> report at the bottom.  There is a blank line
> at the bottom, however.  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
>



-- 
When fascism comes to America, it will be the intolerant selling it as
diversity.



view thread (9+ messages)  latest in thread

Message-ID: <dcc563d10904021953v53412679qdfdc8ba29589a098@mail.gmail.com>
Permalink:  ../dcc563d10904021953v53412679qdfdc8ba29589a098@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10904021953v53412679qdfdc8ba29589a098@mail.gmail.com

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@gmail.com, tsakai@gallo.ucsf.edu
  Subject: Re: How would I get rid of trailing blank line?
  In-Reply-To: <dcc563d10904021953v53412679qdfdc8ba29589a098@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox