MLUG: Re: [MLUG] Re: text file cr/lf annoyance
Re: [MLUG] Re: text file cr/lf annoyance
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On Wed, 2 Oct 2002, Stephen Montgomery-Smith wrote:

> Mike Miller wrote:
> >
> > I find that on the command line, this works just fine:
> >
> > perl -pi -e 's/\015$//' c* f* [i-l]* {reut,mail}*
> >
> > So what's the trick to making that into a perl script?
>
>
> How about this:
>
> #!/usr/bin/perl -i -p
> s/\r$//


Ah!!  That's very nice.  It works perfectly.  Very compact too.
I think it's way nicer than dos2unix, at least on Solaris.

Thanks (once again), Stephen!

Mike

--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php

Archives are available at http://mlug.missouri.edu/list-archives/