Re: Need help for import of text file

From: Peter Bex <Peter(dot)Bex(at)xs4all(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Need help for import of text file
Date: 2012-12-16 23:33:41
Message-ID: 20121216233341.GD14498@frohike.homeunix.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Dec 16, 2012 at 06:30:24PM -0500, Steve Clark wrote:
> why not use the squeeze option of tr.
>
> tr -s " "

I wasn't aware of that one, it's even simpler and more elegant.
Thanks!

For this particular case, tr(1) won't do for the same reason
the simple sed(1) expression I gave won't do: it should only
be applied to the data, not the extra 4 lines of meta-data.

Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2012-12-17 00:25:23 Re: XML Schema for PostgreSQL database
Previous Message Steve Clark 2012-12-16 23:30:24 Re: Need help for import of text file