Manipulating CRLF
Posted: Mon Feb 25, 2013 1:25 pm
I have a big text file where each line is terminated with CRLF (i.e. a standard windows text file).
I have used unix sed to add a pipe at the end of each line.
Each logical file in the big text file is separated with $$$$.
$$$$ is on its own line.
I have removed the pipe from lines with $$$$.
I now would like to delete "|\r\n" (i.e. pipe CRLF) so that the only line with CRLF is $$$$.
Hopefully I then can read each logical record into a spreadsheet as a separate physical record.
How do I replace pipe CRLF (|\r\n) with a single space?
I have used unix sed to add a pipe at the end of each line.
Each logical file in the big text file is separated with $$$$.
$$$$ is on its own line.
I have removed the pipe from lines with $$$$.
I now would like to delete "|\r\n" (i.e. pipe CRLF) so that the only line with CRLF is $$$$.
Hopefully I then can read each logical record into a spreadsheet as a separate physical record.
How do I replace pipe CRLF (|\r\n) with a single space?