Re: How would I get rid of trailing blank line?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: How would I get rid of trailing blank line?
Дата
Msg-id dcc563d10904021953v53412679qdfdc8ba29589a098@mail.gmail.com
обсуждение исходный текст
Ответ на How would I get rid of trailing blank line?  ("Tena Sakai" <tsakai@gallo.ucsf.edu>)
Список 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 по дате отправления:

Предыдущее
От: "Tena Sakai"
Дата:
Сообщение: Re: How would I get rid of trailing blank line?
Следующее
От: "Tena Sakai"
Дата:
Сообщение: Re: [HACKERS] How would I get rid of trailing blank line?