Debian bug report logs -
#737, boring messages
Message sent to debian-devel@pixar.com:
Subject: Bug#737: gawk references to `$0' in END rule give previous record
Reply-To: iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-To: debian-devel@pixar.com
Resent-From: iwj10@cus.cam.ac.uk (Ian Jackson)
Resent-Sender: iwj10@cus.cam.ac.uk
Resent-Date: Tue, 04 Apr 1995 16:33:08 GMT
Resent-Message-ID: <debian-bugs-handler.737.04041629263894@pixar.com>
X-Debian-PR-Package: gawk
X-Debian-PR-Keywords:
Received: via spool for debian-bugs; Tue, 04 Apr 1995 16:33:08 GMT
Received: with rfc822 via encapsulated-mail id 04041629263894;
Tue, 04 Apr 1995 16:29:27 GMT
Received: from pixar.com by mongo.pixar.com with smtp
(Smail3.1.28.1 #15) id m0rwBQY-0006VUC; Tue, 4 Apr 95 09:26 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA19494
(5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Tue, 4 Apr 1995 09:25:41 -0700
Received: by bootes.cus.cam.ac.uk
(Smail-3.1.29.0 #30) id m0rw971-000C0yC; Tue, 4 Apr 95 14:57 BST
Received: by chiark
id m0rw7I5-0000YSZ
(Debian /\oo/\ Smail3.1.29.1 #29.27); Tue, 4 Apr 95 13:01 BST
Message-Id: <m0rw7I5-0000YSZ.ijackson@nyx.cs.du.edu>
Date: Tue, 4 Apr 95 13:01 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Debian bugs submission address <debian-bugs@pixar.com>
Package: gawk
Version: 2.15.6-1
chiark:~/junk> cat t
BEGIN { print "begin rule here >", $0, "<"; }
/./ { print ". rule here >", $0, "<"; }
END { print;
print "end rule just done >", $0, "<"; }
chiark:~/junk> /usr/bin/awk -f t </etc/host.conf
begin rule here > <
. rule here > order hosts,bind <
. rule here > multi on <
multi on
end rule just done > multi on <
chiark:~/junk> cat /etc/host.conf
order hosts,bind
multi on
chiark:~/junk>
As you can see, the `print' and `print "end rule ..."' statements are
using the value of $0 for the last record.
However, according to the gawk info file (node BEGIN/END, at the very
bottom):
`BEGIN' and `END' rules must have actions; there is no default
action for these rules since there is no current record when they run.
This implies that $0 should be empty.
I discovered this bug when trying to build the latest version of the
smail package. It contains an awk script that does a bare `print' in
the END rule, expecting a blank line, but instead gets the final line
of the input file. This causes the build to fail.
Ian.
Message sent:
From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#737: Acknowledgement (was: gawk references to `$0' in END rule give previous record)
In-Reply-To: <m0rw7I5-0000YSZ.ijackson@nyx.cs.du.edu>
References: <m0rw7I5-0000YSZ.ijackson@nyx.cs.du.edu>
Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received. It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.
If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#737" or "Re: Bug#737" so that
we can identify it as relating to the same problem.
Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.
Ian Jackson
(maintainer, debian-bugs)
Ian Jackson /
iwj10@thor.cam.ac.uk,
with the debian-bugs tracking mechanism