[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] A working 68000 SED program?
Hi,
On Wed, Jun 27, 2001 at 04:56:00PM +0200, Helmut Karlowski wrote:
> Hallo Guido
>
> >> SED or a method to change ^M to ^M^N so I can examine and compile the
> >> sources. There are several C sources *( K&R C). but each one is=20
> >> 2 to 3K lines. Too much to expect progess on a parttime basis.
> >
> >Try to find a program "crlf" in your path (comes with MiNT, try "crlf
> >-h"). If you have Perl you can also do
> >
> > perl -pi -e 's/\r\n/\n/' FILENAME[s]
>
> He says he has only \r so
He said so, but I didn't believe him. ;-)
>
> perl -pi -e 's/\r/\n/' FILENAME[s]
>
> or
>
> tr '\r' '\n' <OLDNAME >NEWNAME
>
> would be better. Not testet.
Perl and crlf can do that in place and can process many files at
once and can change in either direction. That's why I prefer them to tr.
Ciao
Guido