Thankyou all for your advice,
Looking further into the issue I have realised that "data and formatting"
lines are denoted by the same CR/LF symbols. So if I where to replace all
CR/LF symbols it would create a file with one line... I have replace the
CR/LF for reading purposes below with \r\n or alternatively 0D 0A (hex):
columnA columnB
1 What a day!\r\n
2 What a week it has\r\n
been!\r\n
3 What the!\r\n
What this means that it is impossible to move line three back to line two to
look something like this:
columnA columnB
1 What a day!\r\n
2 What a week it has\rbeen!\r\n
3 What the!\r\n
I was thinking of writing code that checked each line to see if correct
number of tab delimited elements in this case 2 elements, if this was not
the case replace the \r\n with \r.
Theo
-----Original Message-----
From: Harald Fuchs [mailto:hf0722x(at)protecting(dot)net]
Sent: Wednesday, 13 October 2004 1:38 AM
To: Theo Galanakis
Subject: Re: Export tab delimited from mysql to postgres.
> Could you provide a example of how to do this?
Depends on what exactly your dump file contains. Probably something like
sed 's/\\\r/\\r/g'
This means: replace all carriage returns preceded by a backslash by '\r'.
______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright. If you
have received this email in error, please advise the sender and delete
it. If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone. You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.