[SunHELP] data manipulation - removing ^M's

Bashar sunhelp at sunhelp.org
Tue Nov 28 10:19:44 CST 2000


	perl -pi -e "s:^M:^V:g" filename

	the ^M and ^V are real control charecters you might not see them
but it works .

                    KuwaitNet Communications Inc.
        Bashar A AlAbdulhadi            Sales Manager/Administrator
        bashar at kuwaitnet.net            http://www.KuwaitNet.net
        Phone: (KW) +965-2647060        Fax: (KW) +965-5337060
        Phone: (US) +514-2417955        Fax: (US) +208-2755778
        ICQ UIN: 19907999               Pager: (KW) 9312471
        IRC: Big @ #Kuwaitnet           YaHoO ID: kuwaitnets
        Toll free (from USA & Canada only)  1-888-KuwaitNET

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

On Tue, 28 Nov 2000, Fuerst, Robert C. (Chris) wrote:

> I thought the best fix for this was dos2unix?
> 
> > -----Original Message-----
> > From:	Bill Bradford [SMTP:mrbill at mrbill.net]
> > Sent:	Tuesday, November 28, 2000 2:27 AM
> > To:	sunhelp at sunhelp.org
> > Subject:	Re: [SunHELP] data manipulation
> > 
> > On Tue, Nov 28, 2000 at 01:51:40AM -0500, Dennis L. Lund wrote:
> > > I run the following script to remove the ^M:
> > > #!/usr/bin/ksh
> > > if [ -f $1 ]
> > > then
> > >    tr -d '\15' < $1 >newname
> > >    mv newname $1
> > > fi
> > 
> > Or, this does it in VI:
> > 
> > :%s/<ctrl-v><ctrl-m>//g<enter>
> > 
> > bill
> > 
> > -- 
> > Bill Bradford
> > mrbill at mrbill.net
> > Austin, TX
> > _______________________________________________
> > SunHELP maillist  -  SunHELP at sunhelp.org
> > http://www.sunhelp.org/mailman/listinfo/sunhelp
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
> 




More information about the SunHELP mailing list