Re: Problem with g command in ed

2015-05-16 Thread hruodr
Andreas Kusalananda Kähäri wrote: > > g/a/\ > > d > > The command that you give is, according to the manual, equivalent to > > g/a/p\ > d > > (since "A newline alone in command-list is equivalent to a p command"). > > So, it prints all lines matching /a/ and then deletes them. I expect p

Re: Problem with g command in ed

2015-05-16 Thread Andreas Kusalananda Kähäri
On Sat, May 16, 2015 at 07:49:53PM +, hru...@gmail.com wrote: > Dear Sirs! > > I am having a problem with the above command. I am using an older > version of OpenBSD, but perhaps the problem is also in newer versions. > > Experiment: > > (1) Write a file with 5 lines, each containg only the

Problem with g command in ed

2015-05-16 Thread hruodr
Dear Sirs! I am having a problem with the above command. I am using an older version of OpenBSD, but perhaps the problem is also in newer versions. Experiment: (1) Write a file with 5 lines, each containg only the character "a". (2) apply the following two lines command: g/a/\ d Does it