[net.lang] AWK

wdr@faron.UUCP (William D. Ricker) (08/12/85)

I've been enjoying Jon Bentley's "Programming Pearls" column in the
CACM.  However, it appears the AWK he's using at Murray Hill is a lot
fancier than the one that comes with 4.2BSD.  Does the AWK that
includes functions come with System V?  Or do us mundanes (non-AT&Ters)
just treat it as his private specification language until SYSTEM (++V)
comes out?  (Is Kernighan even supplying it to the packagers of
commercial Un*x?)

[Follow-up to net.lang, except for SYSTEM (++V) Bundling spinoffs]



-- 

  William Ricker
  wdr@faron.UUCP						(UUCP)
  decvax!genrad!linus!faron!wdr					(UUCP)
 {allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!faron!wdr	(UUCP)

Opinions are my own and not necessarily anyone elses.
No warranty, expressed or implied, is given about the veracity of any
statements contained herein.  Applicable law in your state may differ.

guy@sun.uucp (Guy Harris) (08/14/85)

> I've been enjoying Jon Bentley's "Programming Pearls" column in the
> CACM.  However, it appears the AWK he's using at Murray Hill is a lot
> fancier than the one that comes with 4.2BSD.  Does the AWK that
> includes functions come with System V?

The "awk" that comes with System V Release 1 is a version marginally
older(!) than the 4.2BSD one - there are a couple of *extremely* minor
things in the 4.2 one not in the S5R1 one.  The 4.2 "awk" also has some
fixes which keep it from trying to dereference NULL pointers.  The "awk"
that comes with System V Release 2 is later than the 4.2 one, and has all
the aforementioned features, but, alas, not the bug fixes.  (Those may show
up later, since they broke the 68000 and possibly the 80286 microports,
assuming AT&T folds all bug fixes from the microports back into the
mainstream UNIX.)  The S5R2 "awk" is also significantly faster than the
older ones.  However, it doesn't have any major new features.

What version Bentley is running, I don't know, but I suspect it's an
in-house version at AT&T BL research.

	Guy Harris

psc@lzwi.UUCP (Paul S. R. Chisholm) (08/17/85)

In article <323@faron.UUCP>, wdr@faron.UUCP (William D. Ricker) writes:
> I've been enjoying Jon Bentley's "Programming Pearls" column in the
> CACM.  However, it appears the AWK he's using at Murray Hill is a lot
> fancier than the one that comes with 4.2BSD.  Does the AWK that
> includes functions come with System V?  Or do us mundanes (non-AT&Ters)
> just treat it as his private specification language until SYSTEM (++V)
> comes out?  (Is Kernighan even supplying it to the packagers of
> commercial Un*x?)

According to one of the att internal newsgroups, awk with functions
is still a research "product".  The posting was looking for heavy
awk users inside AT&T to act as beta sites for the new version.  It's
not even being generally distributed within Bell Labs (yet).
-- 
       -Paul S. R. Chisholm       The above opinions are my own,
       {pegasus,vax135}!lzwi!psc  not necessarily those of any
       {mtgzz,ihnp4}!lznv!psc     telecommunications company.
       (*sigh* ihnp4!lzwi!psc does *NOT* work!!!  Use above paths.)
"Of *course* it's the murder weapon.  Who would frame someone with a fake?"

tiberio@seismo.CSS.GOV (Mike Tiberio) (08/20/85)

I don't read CACM, what functions are you talking about? We have added
all the siingle argument math functions from libm.a to awk. We also use
awk on double precision data and found it necessary to modify awk so that
it would never convert the double to single during handling. Our version
came with getline and exit, are these the functions you are talking about?

seismo!tiberio

wdr@faron.UUCP (William D. Ricker) (08/21/85)

In article <19@seismo.CSS.GOV> tiberio@seismo.CSS.GOV (Mike Tiberio) writes:
>
>I don't read CACM, what functions are you talking about? We have added
>all the siingle argument math functions from libm.a to awk. We also use
>awk on double precision data and found it necessary to modify awk so that
>it would never convert the double to single during handling. Our version
>came with getline and exit, are these the functions you are talking about?
>
>seismo!tiberio

No, the 'functions' I was referring to is the facility for user-defined
functions.  Apparently Kernighan's latest version of AWK, in use at AT&T
Bell Labs by Jon Bentley, CACM's "Programming Pearls" columnist,
allows definitions of recursive AWK functions.)  Guy Harris suggests
these features might be in SVR2, but I didn't quite follow his
description of what was in which release.

(Bentley gives, in AWK, a subroutine library of various sorting and
searching routines, pointing to particular spots he had trouble
implementing even though he had formally verified the specifications.)
-- 

  William Ricker
  wdr@faron.UUCP						(UUCP)
  decvax!genrad!linus!faron!wdr					(UUCP)
 {allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!faron!wdr	(UUCP)

Opinions are my own and not necessarily anyone elses.
No warranty, expressed or implied, is given about the veracity of any
statements contained herein.  Applicable law in your state may differ.

guy@sun.uucp (Guy Harris) (08/23/85)

> Guy Harris suggests these features might be in SVR2, but I didn't quite
> follow his description of what was in which release.

You certainly didn't; I suggested that they were probably *NOT* in S5R2,
because it's mainly a sped-up version of the (post-S5) "awk" that comes with
4.2BSD.

	Guy Harris