Re: How would I get rid of trailing blank line? - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: How would I get rid of trailing blank line?
Date
Msg-id dcc563d10904021953v53412679qdfdc8ba29589a098@mail.gmail.com
Whole thread Raw
In response to How would I get rid of trailing blank line?  ("Tena Sakai" <tsakai@gallo.ucsf.edu>)
List pgsql-sql
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.


pgsql-sql by date:

Previous
From: "Tena Sakai"
Date:
Subject: Re: How would I get rid of trailing blank line?
Next
From: "Tena Sakai"
Date:
Subject: Re: [HACKERS] How would I get rid of trailing blank line?