AITHA, BHEEMSEN (SBCSI) wrote:

> Hi,
> 
> I had copied some files from c:\ drive on to Unix machine. At the end of
> each line, I see the end of line character(^M). To get rid of all these ^M
> characters, I had opened a file in vi and performed the following command.
> 
> :s/^M//g
> 
> But vi says that pattern does not exist. Is there any other hidden character
> associated here ? Can any one tell me how to get rid of them. I have lots of
> files. A small perl script would be a lot  of help to me.


Try one of these:


        :g/^V^M/s///<CR>                # where ^V and ^M are ctrl-V and ctrl-M

or this may work (or maybe not on UNIX, but it will on Win32):


        :set notextmode                 # change to textmode
        :w                              # write the file
        :e!                             # re-edit the file




-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to