Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!rochester!pt.cs.cmu.edu!dsl.pitt.edu!pitt!amanue!oglvee!norm From: norm@oglvee.UUCP (Norman Joseph) Newsgroups: comp.unix.questions Subject: Re: AWK Language Question Message-ID: <588@oglvee.UUCP> Date: 13 Aug 90 16:39:31 GMT References: <972@richsun.cpg.trs.reuter.com> Distribution: usa Organization: Oglevee Computer Systems, Connellsville, Pa Lines: 23 In <972@richsun.cpg.trs.reuter.com>, boi@richsun.cpg.trs.reuter.com (Ken Boi) writes: >According to the book "The AWK Programming Language", there >are built-in string functions. One of them is 'gsub'. I have >tried using it with the following comand line statement which >is very close to the example in the book: > [...] >I get the error messages: > awk: syntax error near line 1 > awk: illegal statement near line 1 >Anybody know why? The awk you are running on your system (you don't tell us what you have) is an earlier version of the one described in _The_AWK_Programming_Language_, which is a (relatively) recent update. If your system is like some, you may have the new version of awk listed under the name "nawk" (new awk). -- Norm Joseph cgh!amanue!oglvee!norm@dsi.com Oglevee Computer Systems, Inc. {pitt,cgh}!amanue!oglvee!norm "Shucking Usenet oysters in pursuit of a pearl." -- Bill Kennedy