Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site ihuxf.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ihuxf!katrina From: katrina@ihuxf.UUCP (Woodward) Newsgroups: net.micro.att Subject: Re: UNIX PC command surprises... Message-ID: <2852@ihuxf.UUCP> Date: Mon, 24-Mar-86 21:11:21 EST Article-I.D.: ihuxf.2852 Posted: Mon Mar 24 21:11:21 1986 Date-Received: Thu, 27-Mar-86 07:02:32 EST References: <351@hropus.UUCP> <888@kitty.UUCP> Organization: AT&T Bell Laboratories Lines: 29 > 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. Near as I can tell tho, these three programs do NOT behave differently based on argv[0]! At least 'fgrep' doesn't behave any differently than 'grep' (it can't seem to read from a file) - and 'egrep' doesn't know the "editor-like" statements its supposed to know. I for one DO feel gyped on this one!! Katrina Woodward ihnp4!ihuxf!katrina