Dear Bret,

               Just try the attached script . This is very simple and you
will love to use it.

Happy Linuxing!!!!!!!!!

Thanks

K.Deepak

Bret Hughes wrote:

> Thanks to all who responded.  For the record, the solution I came up with
> was tr.  The echo -n I could not get to work in this situation. I believe
> it was because the ^M was already there.  It appears from the man page
> that echo -n will merely keep a ^M from being appended.  This is a weird
> thing that I have yet to really get my head around.  It took a tr -d
> "\n,\r" to get the functionality I needed.  \n or \r alone would not do
> it.  What the heck does ^M do anyway?  I thought that dos did the cr lf
> deal seperatly and *nixes used just on but from my experiments it would
> appear that the were both ther even though only a singel ^M showed up.
>
> Thanks again to all.
>
> Bret
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.
if [ $# = 0 ]
then    
   echo "Usage: $0 file [file ...] "
   exit 1
else       
   for FILE in $*
   do              
     chmod 0666 $FILE
     vi -b -c %s/
$//g  -c %s/
/
/g -c wq $FILE
   done  

   echo 'all control m characters removed '     
fi      

exit 0
begin:vcard 
n:K;DEEPAK
tel;pager:9610129463
tel;fax:+91-44-2432749
tel;work:+91-44-2432414,2432749
x-mozilla-html:FALSE
url:http://www.adventnet.com
org:ADVENTNET DEVELOPMENT CENTRE (INDIA) PVT. LTD
version:2.1
email;internet:[EMAIL PROTECTED]
title:ENGINEER - SYSTEM ADMINISTRATION
adr;quoted-printable:;;ADVENTNET (INDIA)=0D=0A13-A VELACHERY MAIN ROAD=0D=0A"KAASHYAP ENCLAVE"=0D=0AVELACHEY;CHENNAI;TAMILNADU;600042;INDIA
x-mozilla-cpt:;27552
fn:DEEPAK K
end:vcard

Reply via email to