Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!mhuxt!mhuxr!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ritcv!rocksvax!rocksanne!sunybcs!kitty!larry From: larry@kitty.UUCP (Larry Lippman) Newsgroups: net.micro.att Subject: Re: UNIX PC command surprises... Message-ID: <888@kitty.UUCP> Date: Wed, 19-Mar-86 20:23:21 EST Article-I.D.: kitty.888 Posted: Wed Mar 19 20:23:21 1986 Date-Received: Mon, 24-Mar-86 00:27:10 EST References: <351@hropus.UUCP> Organization: Recognition Research Corp., Clarence, NY Lines: 25 Summary: Haven't you heard of argv[0]? 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. > > Boy, and to think that people pay extra to get egrep > with the Development Set.... Aw, come on! *THINK* I'm suprised that you haven't discovered that ``edit'', ``ex'', and ``vi'' are also identical and are linked together. Does that mean they are the same? 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. ==> 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!/ <==