Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!bloom-beacon!tut.cis.ohio-state.edu!husc6!rice!sun-spots-request From: dcatla!itwaf@gatech.edu (Bill Fulton [Sys Admin]) Newsgroups: comp.sys.sun Subject: Re: Help with AWK Keywords: SunOS Message-ID: <4094@kalliope.rice.edu> Date: 20 Jun 89 23:03:50 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 35 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 48, message 7 of 19 In article <3827@kalliope.rice.edu> hodge!jdm@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)