awk Question
Norman Joseph
norm at oglvee.UUCP
Thu Jan 11 01:49:37 AEST 1990
In <3384 at linus.SLCS.SLB.COM>, by oneill at getafix.slcs.slb.com (Dennis O'Neill):
>
> [writing about parsing multi-line records with awk, and getting a
> syntax error on a line using the gsub() function call:]
>
> {gsub(/\\\\/, ""); print $0}
>
> [generates:]
>
> awk: syntax error near line 1
> awk: illegal statement near line 1
On my system (Altos running Unix 5.3.1) there are
two versions of awk, namely "awk" and "nawk" (new awk).
Apparently nawk is the latest version of awk as described
in the book _The_AWK_Programming_Language_ by Aho,
Kernighan, & Weinberger, and includes gsub() as a builtin
function, while plain old awk does not. My suspicion is
that you are using the old awk.
--
Norm Joseph - Oglevee Computer System, Inc.
UUCP: ...!{pitt,cgh}!amanue!oglvee!norm
/* you are not expected to understand this */
More information about the Comp.unix.questions
mailing list