SLUG Mailing List Archives
[SLUG] sed search on outlook export
- To: Slug List <slug@xxxxxxxxxxx>
- Subject: [SLUG] sed search on outlook export
- From: Peter Tyler <peter.tyler@xxxxxxxxxxxxxxxx>
- Date: Wed, 17 Mar 2004 09:07:40 +1100
- Organization: Blaze Tech
- Reply-to: peter.tyler@xxxxxxxxxxxxxxxx
- User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)
Hi
I'm trying to search and replace some "cr" and "lf" characters in a
text file (comma separated).
I want to substitute the crlf" characters (that is carriage return,
line feed, double quote.) for cr|lf" (that is carriage return,
pipe, line feed, double quote)
The reason I am trying to do this is that I have a text (csv) file out
of Outlook that has carriage return line feeds in the address fields,
and this is causing the other fields to become miss aligned when
reading into my open office spread sheet. By changing the record
separator, I can then go through and change the inconsistencies within
the address field, then just change the record separator back to crlf.
I have been trying the following sed 's/\x0D\x0A\"/\x0D|\x0A\"/g' but
it does not seem to pick up on the hex chars at all. So nothing is changed.
Does anyone know an easier way of doing this? I tried hexedit but could
find a global "search and replace" function.
Thanks
Pete