On Tue, Dec 02, 2003 at 05:53:59PM -0500, parv wrote:
> in message <[EMAIL PROTECTED]>,
> wrote Bryan Cassidy thusly...
> >
> > I've downloaded a couple of .xhtml files and they have ^M characters
> > all through it. I tried the col -b < name > newname command on these
> > files but when I do that it erases the whole document. Any ideas?
> 
> Ah, a FAQ of comp.unix.* groups...
> 
>   http://groups.google.com/groups?q=remove+%22%5EM%22+file+group%3Acomp.unix.*
> 
> 
> It pains me not to see even a mention of sed, even though i prefer the
> "perl pie" solution myself.  To rectify the situation...
> 
>   #  one way to type ^M is: Ctrl-V followed by Ctrl-M
>   sed -e 's/^M$//' old > new && mv -f new old
> 

Freebsd's sed has -i

  sed -ie 's/^M$//' old

- Rob
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to