jrw@hropus.UUCP (Jim Webb) (03/13/86)
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.... Moral of the Story: Hope you have a Source License for a "real" UNIX machine and recompile the "real" sources.... But enough already, right? There is one nice undocumented feature about the 7300 I did discover though, link the ls command to lf and you will get astericks after executables (sort of like an automatic ls -CF) and linking it to ll gives an automatic ls -l. -- Jim Webb ihnp4!houxm!hropus!jrw
larry@kitty.UUCP (Larry Lippman) (03/20/86)
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!/ <==
gwyn@brl-smoke.ARPA (Doug Gwyn ) (03/20/86)
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. > ... > But enough already, right? There is one nice undocumented > feature about the 7300 I did discover though, link the > ls command to lf and you will get astericks after executables > (sort of like an automatic ls -CF) and linking it to ll gives > an automatic ls -l. In other words, the 7300 does not have UNIX, but rather an approximation thereof. What a crock! ATTIS is liable to lose big in the marketplace if they can't get their UNIX act together any better than they have so far.
dbw@ariel.UUCP (DAVE B. WOOD) (03/21/86)
... > ``edit'', ``ex'', and ``vi'' are also identical and > are linked together... edit, ex, and vi have always been the same; grep, fgrep, and egrep have never been the same, and still are not. The UNIX PC egrep is really grep, and does not support full regular expressions.
gwyn@brl-smoke.ARPA (Doug Gwyn ) (03/23/86)
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.
jnj@mb2c.UUCP (Jim Jackson) (03/24/86)
> 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? Not to mention cp, ln and mv. All one program that behaves differently depending on how the program is called.
bamford@ihuxp.UUCP (Bamford) (03/25/86)
> 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 & > 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. It is true, and it is reasonable, that some programs modify their behavior according to the name by which they are called. However, the original comment above was to the effect that "egrep" was not behaving as advertised, and it appears to be because it is the same as "grep". egrep, grep, and fgrep use radically different methods and do not normally share source, so seeing them linked together IS a surprise. -- Harold Bamford AT&T Bell Labs (cornet) 8-367-5744 Naperville, Ill (312) 979-5744
jrw@hropus.UUCP (Jim Webb) (03/25/86)
> In article <351@hropus.UUCP>, jrw@hropus.UUCP (Jim Webb) (me) writes: > > Has anyone else out there noticed that on the "7300" the > > grep, egrep, and fgrep commands are IDENTICAL. > > > > 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. Golly gee...that's why cp and ln are linked as well! Boy, am I learning stuff today! NOW, IF ONLY THE GREP COMMANDS *WORKED* ON THE 7300 THE WAY THEY ARE SUPPOSED TO, I WOULD BELIEVE THAT THEY LOOKED AT ARGV[0] BUT SINCE THEY DON'T I DON'T BELIEVE YOUR LITTLE PROGRAMMING EXAMPLE DOES ANYTHING FOR MY GRIPE. Why don't you go login to a 7300 some time and test out an egrep expression like I stated above (nproc|NPROC) and you will see that it does not work. Also, egrep is a yacc/lex program in ATT System V while grep is written in straight C so I don't know how it is so similar. Sorry to take up so much room here... -- Jim Webb ihnp4!houxm!hropus!jrw
katrina@ihuxf.UUCP (Woodward) (03/25/86)
> 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
larry@kitty.UUCP (03/28/86)
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!/
gwyn@brl-smoke.UUCP (03/30/86)
In article <919@kitty.UUCP> larry@kitty.UUCP (Larry Lippman) writes: > 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. Don't get me wrong; I would love to have a single grep-like utility instead of several. However, the three existing *greps do not have the same pattern expression grammar, for example, and therefore if the very same code is used by the 7300 for all three, two of them are broken. This may not matter to those who hack on just the 7300, but if you're trying to maintain applications across a number of systems, you want a common environment (including *grep behavior).
dave@andromeda.RUTGERS.EDU (Dave Bloom) (03/31/86)
<> > Traditional System V Release 2.x does use two totally different > programs for egrep(1) and grep(1).... > > 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. Probably to save space on an already cramped disk. You only need one executable instead of three. -- ------------------------------------------------------------------------------- allegra\ Dave Bloom harvard \ pyramid\ seismo \ pyrnj \ Home: (201) 861-7437 ut-sally >!topaz >!andromeda!dave Office: (201) 648-5083 sri-iu / caip / ihnp4!packard / yogi/ "You're never alone with a schizophrenic...."
rjk@mrstve.UUCP (Richard Kuhns) (04/04/86)
In article <166@andromeda.RUTGERS.EDU> dave@andromeda.RUTGERS.EDU (Dave Bloom) writes: ><> >> Traditional System V Release 2.x does use two totally different >> programs for egrep(1) and grep(1).... >> >> 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. > >Probably to save space on an already cramped disk. You only need one executable >instead of three. >-- Sounds good, but on my machine I have *2* separate executable files. `grep' and `egrep' are both links to one file, while `fgrep' is a file by itself. This makes even less sense to me, since running cmp on fgrep & grep doesn't show any differences... -- Rich Kuhns {ihnp4, decvax, etc...}!pur-ee!pur-phy!mrstve!rjk
dan@rose3.UUCP (Dan Messinger) (04/04/86)
In article <1948@brl-smoke.ARPA> gwyn@brl.ARPA writes: >In article <351@hropus.UUCP> jrw@hropus.UUCP (Jim Webb) writes: >> But enough already, right? There is one nice undocumented >> feature about the 7300 I did discover though, link the >> ls command to lf and you will get astericks after executables >> (sort of like an automatic ls -CF) and linking it to ll gives >> an automatic ls -l. > >In other words, the 7300 does not have UNIX, but rather an >approximation thereof. What a crock! ATTIS is liable to >lose big in the marketplace if they can't get their UNIX >act together any better than they have so far. But thats exactly what my manual says it should do. (And its not for the 7300 -- its a Sys III with a few 4.1 features). And I had the same thing on a Pixel running sort of 4.1. Dan Messinger ihnp4!rosevax!rose3!dan
rlk@chinet.UUCP (Richard L. Klappal) (04/05/86)
The UNIX(tm) PC7300 version of SYSV is different from the 3B2, etc. versions of UNIX because the PC7300 is OEMed from Convergent Tech. and uses their port (or whoever they bought the port from) of SYSV Rev 1. Oh for really !! portable UNIX ... hope hope. -- --- UUCP: ..!ihnp4!chinet!uklpl!rlk || MCIMail: rklappal || Compuserve: 74106,1021 ---