Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!scherzo!allegra!princeton!orsvax1!pyrnj!caip!seismo!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: net.micro.att Subject: Re: UNIX PC command surprises... Message-ID: <2012@brl-smoke.ARPA> Date: Sun, 23-Mar-86 04:23:24 EST Article-I.D.: brl-smok.2012 Posted: Sun Mar 23 04:23:24 1986 Date-Received: Tue, 25-Mar-86 05:01:28 EST References: <351@hropus.UUCP> <888@kitty.UUCP> Reply-To: gwyn@brl.ARPA Organization: Ballistic Research Lab (BRL) Lines: 19 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. > > 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. What makes you think the source code for grep & egrep is similar? They haven't been at all similar from the beginning through SVR2.