On Fri, May 23, 2008 at 11:24:38PM -0700, Ralph Shumaker wrote:
> I have a file that has many, many, many long lines, each with many sets
> of data, each set being separated by many spaces, each instance of which
> is ended by character 0x013, kinda like:
> data   ^Mdata   ^Mdata   ^Mdata   ^Mdata   ^M
> but the spaces before the ^M are about 77 in number (seems to be
> consistent), and the data strings are longer, containing several
> elements, each separated by either one, two, or three spaces.  If I can
> match on any number of spaces ("[ ]*") which are immediately followed by
> 0x013 (^M) and replace each instance with a newline, I'll be set (almost
> certainly).

DOS follows some international standard that mandates line endings of /r/n.
Linux uses just /n.

So you don't want to replace /r  with a newline because you'll have 2 /n's
ending every line.

Just replace /r with nothing.

Chris


-- 
KPLUG-List@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to