"fgrep" doesn't always match everything it should

guy at sun.UUCP guy at sun.UUCP
Wed Apr 23 10:36:16 AEST 1986


> 	4) Either this fix, or the one involving "qloop", or both, were
> 	   in some update to V7 which I remember seeing.  This update
> 	   also had "fsck", some fixes to bugs mentioned by Dennis Ritchie
> 	   in a talk which was commented on in some issue of ";login"
> 	   (one such bug, I remember, was that some error bit for some
> 	   DEC tape driver was incorrectly #defined in the driver), new
> 	   versions of "f77" and "awk" and some other programs (the
> 	   new versions ended up in 4BSD, but didn't completely make it
> 	   into System N until S5R2 or so).

It sure was.  From the README file from that addendum tape:

	Addenda to UNIX 7th edition distribution tape, 12/2/80.

		fgrep.c: new source for fgrep(1) corrects certain
		      troubles with keys with common prefixes

The "V7 addendum" and 4.2BSD versions of "fgrep" are almost identical; the
only significant differences are that the 4.2BSD version accepts "-i" as
well as "-y" for the "case-independent matching" flag (which is interesting,
considering the S5 version accepts "-i" but not "-y") and the 4.2BSD version
uses a block size of BUFSIZ (1024 bytes on 4.xBSD) rather than 512.

This, of course, raises the question "why didn't this fix make it into
System V, and why did System V's "-i" flag use a subroutine for character
comparison rather than a macro?"  I suspect the answer is the same as for
the question "why didn't the new 'f77' or 'awk' make it in until S5R2 or
so", which is "nobody in the USDL knew about it."  One suspects the lines of
communication between BTL research and AT&T-IS need some Roto-Rooter(TM)
work...

> This bit of UNIX trivia not brought to you by Abbott Horn (or is it Abbott
> and Horn?), makers of Trivial Pursuit.

It's Horn Abbott, you nitwit.
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy at sun.arpa



More information about the Net.bugs.usg mailing list