bug-ed
[Top][All Lists]
Advanced

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

Re: [Bug-ed] bug-ed: 0 not recognized in {n,m}


From: Digital2015 Life
Subject: Re: [Bug-ed] bug-ed: 0 not recognized in {n,m}
Date: Fri, 18 Oct 2019 18:05:21 -0700

Ah,, Thanks for your reply. Mike

> On Fri, Oct 18, 2019 at 7:30 AM Digital2015 Life <address@hidden> wrote:
> 
>> The bug is about {n,m} regular expression in ed.
>>
>> ed does not recognize 0 in {n,m} which it should.
> 
> If you read the Posix spec 
> <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed.html>, you'll 
> see that the addresses of lines are positive numbers. Address 0 is only valid 
> in six specific places:
> 
> 0a means "insert at the beginning at the buffer"
> 0,nc is the same as 1,nc for historical reasons
> 0i is the same as 1i for historical reasons
> m,nm0 means "move lines to before
> 
> the beginning at the buffer"
> 0r means "read file and insert it at
> 
> the beginning at the buffer"
> m,nt0 means "copy lines to before
> 
> the beginning at the buffer"
> 
> As you can see, the s command is not included.
> 
> The GNU ed manual 
> <https://www.gnu.org/software/ed/manual/ed_manual.html#Commands> says the 
> same things, except that it doesn't mention address 0 for the c command 
> (though it does work as above).
> 
> John Cowan http://vrici.lojban.org/~cowan address@hidden
> Dream projects long deferred usually bite the wax tadpole.
> --James Lileks



reply via email to

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