Date: Sat, 30 Aug 1997 08:33:11 -0500 From: Edwin Culp <eculp@mexcom.net> To: gkshenaut@ucdavis.edu Cc: questions@FreeBSD.ORG Subject: Re: Stripping ^M from llines? Message-ID: <34082117.10820BBF@mexcom.net> References: <199708300228.TAA05602@myrtle.bogs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34082117.10820BBF>