Help with AWK

Bill Fulton [Sys Admin] dcatla!itwaf at gatech.edu
Wed Jun 21 09:03:50 AEST 1989


In article <3827 at kalliope.rice.edu> hodge!jdm at uunet.uu.net (jdm) writes:
>I have been attempting to teach myself AWK on a Sun 386i running SunOS
>4.0.1.  After entering numerous examples of AWK code from the book "The
>AWK Programming Language" by Aho, Kernighan, and Weinberger, I find that
>none of them run!  I get error messages complaining about expressions and
>syntax and none of the messages give me an indication of a definitive
>problem.

Note that the awk in SUNOS 3.x and 4.0 is NOT 'nawk' (new awk), and the
AKW book describes nawk. The man page for awk defines the subset of the
features described in the book which are available with the current SUNOS
awk.  It's tough to use 'old awk' after you read about 'new awk'.

I posted an article about this several months ago. I got some great
responses, and I appologize for not summarizing them in this newsgroup.
Basicly, the 'new' implementation of awk MAY show up in SUNOS 4.1.

In the meantime; I was lucky enough to finagle a copy of GNU awk ('gawk').
(And if they come out with ANOTHER version, I guess it'll be called 'yawk'
- 'yet another...' - aieeeee!) This is a good imp of nawk. There are some
things about it I'm not crazy about, but it seems to work ok, and the
'new' features are very, very, [very,...], handy.

BTW - I'm getting more and more hooked on awk for prototypes and small
scale projects. You have to use it for a few small projects before you
begin to appreciate it. Anyone for an awk newsgroup?
("comp.lang.inspired_by_a_bird"?)

Bill ("stop me before I parse again") Fulton

P.S.  There's a great description, in "Life With Unix", about an awk T-Shirt.
It has a bird-like creature jumping out of a flaming aeroplane, with the
caption:
	"Bailing out near line 1"
(You gotta use awk to appreciate the humor)



More information about the Comp.sys.sun mailing list