AWK User Assistance
Dick Hauser
nab1382 at dsacng1.UUCP
Thu Apr 21 23:06:39 AEST 1988
I purchased the book "The AWK Programming Language". Right now,
I am working my way through the book. I have encountered problems
with user-defined functions (Page 53). I am familiar with "C"
and the bourne shell. I wrote a small AWK program which called
a user-define function. Syntax errors keep occurring.
{ init_rpt()
print $1, $2 $3
}
function init_rpt {
print " SAMPLE HEADER"
}
As a last resort, I wrote a small program like the one above, but
still received errors (syntax error near xxx, bailing out near xxx).
I read paragraph 2.3 (User-Defined Functions) quite a few times, and
can locate the problem. Apparently, there is a syntax requirement
I am not aware of. Finally, I you have a list of AWK "gotchas",
I would appreciate receiving a copy.
Thanks in advance -
Dick Hauser
D
D
D
:
More information about the Comp.unix.questions
mailing list