in reply to Remove the ^M Character from a Document

Or... in solaris you can do:
dos2unix <filename> <newfilename>
  • Comment on Re: Remove the ^M Character from a Document

Replies are listed 'Best First'.
Re: Re: Remove the ^M Character from a Document
by KM (Priest) on Jan 04, 2001 at 23:28 UTC
    You can get a dos2unix (and unix2dos) for any flavor of UNIX/BSD.

    Cheers,
    KM

Re: Re: Remove the ^M Character from a Document
by mirod (Canon) on Jan 05, 2001 at 01:01 UTC

    The problem is that dos2unix removes ^M, while I often have to replace them by spaces (in the SGML exported by FrameMaker for example), so I end up doing:

    perl -pi e's{\r}{ }g;'