> I was sent an html file that has no newlines in anything that I can find
> on my box.  I have tried vi gnotepad gedit ghex.  Netscape view->page
> source renders it correctly.  vi shows a bunch of ^M where the newlin
> should be so I tried:
> 
>:%s/ctrl-vctrl-M/\n/g to no avail.  I am afraid this is the extent of my
> vi skills.  ghex shows the offending char as 0D.  How can I convert this
> file to some thing I can read and edit?

There are at least a couple of ways you could do this with vi and tr or
perl.  In vi, from the first line of the file,

    [ESC]:!Gtr '\015' '\012'

should do it, or

    [ESC]:!Gperl -pe 's/\015/\012/g'

etc.  Or if you have a bunch of files, you can use `perl -pi -e' and fix
them all at once from the shell prompt.

-- 
Justin Ballou
The Physician's Computer Company
[EMAIL PROTECTED]



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to