Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2002 15:59:34 -0500 
From:      "Morse, Richard E." <REMORSE@PARTNERS.ORG>
To:        'Peter Leftwich' <Hostmaster@Video2Video.Com>, ann kok <annkok2001@yahoo.com>
Cc:        FreeBSD Questions <FreeBSD-Questions@FreeBSD.Org>
Subject:   RE: special charaters (return key)
Message-ID:  <375F68784081D511908A00508BE3BB17DDDD31@phsexch22.mgh.harvard.edu>

next in thread | raw e-mail | index | archive | help
Peter Leftwich [mailto:Hostmaster@Video2Video.Com] wrote:
> On Wed, 3 Apr 2002, ann kok wrote:
> > Hi all - how do type the special charater? ^M (return key) 
> - I want to remove it on the file
> >
> > eg [root@ann work1]# cat -v crt2.txt
> > test^M
> > a^M
> > b^M
> > c^M
> > d^M
> > e^M
> >
> > sed 's/^M//g' crt1.txt
> > Thank you
> 
> The manpage for sed says there is some issue with the newline 
> character
> "\n" so this may not be the best approach to the problem.  
> Was crt1.txt
> created in DOS or on a Mac? :)

It was created on a DOS computer.  If it was on a Mac, it wouldn't have had the
newline (^J) which showed the separate lines.

Try using '\r' instead of '^M' in the line above, and see if that helps...

HTH,
Ricky

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?375F68784081D511908A00508BE3BB17DDDD31>