Jon, just try this:
$ cat file.txt | tr -d "\015" > file.txt
to remove ^M at the end of lines.
Regards,
        gregory

On Wed, Apr 17, 2002 at 04:07:58PM +0100, Jon Howe wrote:
> I am currently ripping apart some text files on my linux box that where created on 
>windows
> 
> I am having a problem with things like  ^M appearing where I would expect \n and ~S 
>where there should be a  '  .
> I can remove ^M with :
> 
> s/\cM\n/\n/g;   
> 
> I assume this is some sort of char encoding problem can some advise on the best way 
>to deal with this.
> 
-- 
Grzegorz Czaplinski <[EMAIL PROTECTED]>
"The Power to Serve, Right for the Power Users!" - http://www.FreeBSD.org/
 Fingerprint: EB77 E19D CFA2 5736 810F  847C A70F A275 2489 469F

Attachment: msg22352/pgp00000.pgp
Description: PGP signature

Reply via email to