Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Aug 1997 03:41:24 -0500
From:      Prashant Dongre <pdongre@opentech.stpn.soft.net>
To:        Edwin Culp <eculp@mexcom.net>
Cc:        gkshenaut@ucdavis.edu, questions@FreeBSD.ORG
Subject:   Re: Stripping ^M from llines?
Message-ID:  <34092E34.2528FC84@opentech.stpn.soft.net>
References:  <199708300228.TAA05602@myrtle.bogs.org> <34082117.10820BBF@mexcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Edwin Culp wrote:

> Greg Shenaut wrote:
> >
> > In message <34076F58.B5DBAC3F@chalmers.com.au>, Robert Chalmers cleopede:
> > >Hi,
> > >Anyone got a handy program for stripping the ^M from text
> > >lines in fbsd?
> >
> > Try this C program (fixnl).  Maybe it'll work.
> > (I use it on BSD/OS and MS-DOS, but haven't tried it
> > on fbsd.)  It is gzipped and uuencoded.
> >
> I would suggest something a little simpler.
> sed 's/^M$//' filename>filename.tmp
> mv filename.tmp filename
> The ^M is done with the vi editor first typing
> control v followed by a control m.
>
> This can obviously be put in a simple shell program
> to solve the problem forever:-)
>
> ed

  I think this is most sensible in using whatever is already there.....

No separate 'C' or Perl program to this as simple as that....

Prashant.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34092E34.2528FC84>