Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!mhuxm!mhuxf!mhuxi!mhuhk!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!rochester!rocksanne!sunybcs!kitty!larry From: larry@kitty.UUCP Newsgroups: net.micro.att Subject: Re: UNIX PC command surprises... Message-ID: <919@kitty.UUCP> Date: Fri, 28-Mar-86 11:30:56 EST Article-I.D.: kitty.919 Posted: Fri Mar 28 11:30:56 1986 Date-Received: Tue, 1-Apr-86 07:15:25 EST References: <351@hropus.UUCP> <888@kitty.UUCP> <2012@brl-smoke.ARPA> Organization: Recognition Research Corp., Clarence, NY Lines: 34 Summary: Well, the 7300 has DEPARTED from System V Release 2 In article <2012@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In article <888@kitty.UUCP> larry@kitty.UUCP (Larry Lippman) writes: > > In article <351@hropus.UUCP>, jrw@hropus.UUCP (Jim Webb) writes: > > > Has anyone else out there noticed that on the "7300" the > > > grep, egrep, and fgrep commands are IDENTICAL. The other > > > day I did an egrep "nproc|NPROC" or some such thing and > > > it failed! A quick cmp of grep and egrep yielded no > > > differences, in fact, grep and fgrep are linked together. > > > > In case you still don't know the answer... In an program, argv[0] is > >the NAME by which the program was invoked. Since the source code for grep and > >egrep is very similar, the same compiled program is used, with the argv[0] > >being used to switch the internal program logic. The same situation is also > >used for the above editors. > > What makes you think the source code for grep & egrep is similar? > They haven't been at all similar from the beginning through SVR2. Traditional System V Release 2.x does use two totally different programs for egrep(1) and grep(1). In fact, while the grep source is simply grep.c, the egrep source is egrep.y which uses a deterministic algorithm as produced by yacc. HOWEVER, this is NOT TRUE FOR THE 7300; the 7300 functions are identical! I don't have specific source code for the 7300, so I don't know what algorithm is used for the grep functions, but it is obviously not the same as traditional Sys V Release 2. I have no idea why AT&T has made this departure for the 7300. ==> Larry Lippman @ Recognition Research Corp., Clarence, New York ==> UUCP {decvax|dual|rocksanne|rocksvax|watmath}!sunybcs!kitty!larry ==> VOICE 716/688-1231 {rice|shell}!baylor!/ ==> FAX 716/741-9635 {G1, G2, G3 modes} duke!ethos!/ ==> seismo!/ ==> "Have you hugged your cat today?" ihnp4!/