AWK Bug?

Larry McVoy lm at arizona.edu
Wed Mar 2 10:08:11 AEST 1988


In article <729 at senilix.liu.se> kjepo at senilix.liu.se (Kjell Post) writes:
>For some reason, inserting 'foo' after the "/" did the trick:
>
>	grep -h "^\. at tag" sample | awk '
>			{ print "s/" $3 "/" foo ++value[$2] "/g" }

Oh yeah, I remember this one.  One of the authors was feeling playful and
added a variable "bar" to the source code of awk.  The print routine has
this line <if (!strcmp(bar, "foo")) goto tryagain>.  Apparently, he liked
the variable foo.

Really.




















:-) :-) :-)
-- 

Larry McVoy	lm at arizona.edu or ...!{uwvax,sun}!arizona.edu!lm



More information about the Comp.unix.questions mailing list