[SunHELP] Those damn ^M's

Bashar sunhelp at sunhelp.org
Fri Nov 2 23:52:01 CST 2001


	 or even perl -i.bak -npe 's/\r\n/\n/g' *


                    KuwaitNet Communications Inc.
        Bashar A AlAbdulhadi            UNIX Systems Administrator
        bashar at kuwaitnet.net            http://www.KuwaitNet.net
        Phone: (KW) +965-2647060        Fax: (KW) +965-5337060
        Phone: (KW) +965-807060         Fax: (US) +801-4373934
        ICQ UIN: 19907999               Pager: (KW) 9327060
        IRC: Big @ #Kuwaitnet           YaHoO ID: kuwaitnets

           "Quality, Stability, 24 Hours Tech. Support"
                          "Think KuwaitNet"

On Fri, 2 Nov 2001, Nicholas Dronen wrote:

> On Sat, Nov 03, 2001 at 12:24:55AM +0300, Bashar wrote:
> >
> > 	perl -i.bak -npe 's/\r\n/\n/g' <file>
> >
> > 	this will do a backfile of the original file named <file>.bak if
> > you dont want a backup remove the .bak
>
> This one is even more useful when you have a set of files
> from which you want to remove
> 's.  To take your example,
>
> $ perl -i.bak -npe 's/\r\n/\n/g' $(find /dir -name '*.c' -print)
>
> Regards,
>
> Nicholas Dronen
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>




More information about the SunHELP mailing list