s/A*./B/g editor bug?

Henry Spencer henry at utzoo.uucp
Fri Oct 20 02:47:12 AEST 1989


In article <741 at ccssrv.UUCP> perry at ccssrv.UUCP (Perry Hutchison) writes:
>+ 	s/b*a/c/g
>+ on the input line
>+ 	aaaaaaaaaaaaaaaaaaaaa
>+ -- the result is:
>+ 	cacacacacacacacacacac
>+ Both VI and ED behave this way, on at least System V.2 and Ultrix-32 V3.1.
>
>Both also behave this way on SunOS 3.5, which is a 4.2 BSD derivative.
>Anyone care to try it out on a 2bsd or a V7 system?

Using our ed, which although it runs on a Sun is a V6-derived program,
I get the right answer.  Looks like somebody broke it -- Berkeley, for
a guess, but I could be wrong -- and everyone else blindly copied the
mistake.  (I unfortunately don't have a V7 ed source handy to check;
just conceivably it was broken there, although it would surprise me.)
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.bugs.4bsd.ucb-fixes mailing list