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-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
