Help with AWK

James D. Murray hodge!jdm at uunet.uu.net
Sun Jun 11 12:46:06 AEST 1989


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.

I wrote an AWK program to replace a specific character in a file with
another:

	/;/ { sub(/;/, "X", $0) }  # replace all ; with X

and AWK choked on the sub() function.  Likewise AWK dosen't seem to
recognise "getline", "gsub", "index", "substr", etc.  Does SunOS come with
an older version of AWK that does not implement these functions?  If not,
what is going wrong?

	jdm at hodge.cts.com [uunet zardoz]!hodge!jdm

	James D. Murray, Ethnounixologist
	Hodge Computer Research Corporation
	1588 North Batavia Street 
	Orange, California 92667  USA

	TEL: (714) 998-7750	Ask for James
	FAX: (714) 921-8038	Wait for the carrier
#!



More information about the Comp.sys.sun mailing list