bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ed and ^M


From: Andrew L. Moore
Subject: Re: ed and ^M
Date: Thu, 15 Nov 2001 17:28:46 -0800

GNU ed is anti-Microsoft.
Try `l'isting the result.  It contains an embedded carriage return (\r).

# ed /var/spool/news/out.going/884-1005862565-1  
658
1
Newsgroups: tw.bbs.soc.media,tw.bbs.rec.tv
s/$/,soc.culture.taiwan/l
Newsgroups: tw.bbs.soc.media,tw.bbs.rec.tv\r,soc.culture.taiwan$

The result is correct with respect to the POSIX standard, I believe.
-AM

In message <address@hidden>, Dan Jacobson writes:
>While using ed on a file formatted with ^M's at the end of each
>line, the output could be quite disturbing:
>
># ed /var/spool/news/out.going/884-1005862565-1  
>658
>1
>Newsgroups: tw.bbs.soc.media,tw.bbs.rec.tv
>s/$/,soc.culture.taiwan 
>,soc.culture.taiwansoc.media,tw.bbs.rec.tv
>u
>p
>Newsgroups: tw.bbs.soc.media,tw.bbs.rec.tv
>s/$/xxx
>xxxsgroups: tw.bbs.soc.media,tw.bbs.rec.tv
>u
>s/tv/tv,soc.culture.taiwan 
>Newsgroups: tw.bbs.soc.media,tw.bbs.rec.tv,soc.culture.taiwan 
>w
>678
>q
>
>One seems not to be able to keep track of what ed is thinking from
>merely looking at the screen.
>
>$ ed --version
>GNU ed version 0.2
>-- 
>http://www.geocities.com/jidanni/ Tel+886-4-25854780
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]