Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!decvax!mcvax!guido
From: guido@mcvax.UUCP (Guido van Rossum)
Newsgroups: net.unix-wizards
Subject: Re: Awk bug+fix -- Do Not Install This "Fix"!
Message-ID: <5730@mcvax.UUCP>
Date: Mon, 5-Mar-84 10:17:07 EST
Article-I.D.: mcvax.5730
Posted: Mon Mar  5 10:17:07 1984
Date-Received: Wed, 7-Mar-84 08:11:29 EST
References: <2389@hplabs.UUCP>
Organization: CWI, Amsterdam
Lines: 14

Eh, excuse me, but I don't think it is a bug in Awk that files are not
closed after they have been written.  It is a *feature*.  Maybe the
documentation doesn't state it well, but the idea is that something like
	awk '/pattern/ { print > "file" }'
is equivalent to
	grep pattern >file
and similar for the pipe (|) notation.  So there is more to it than just
efficiency.  (Note that the 'w' command of Sed has the same semantics --
different from Ed but much more useful in a stream editing environment.)
    I think this is a nice feature, wouldn't want to miss it, and it
shouldn't be disabled by the "fix" suggested by Ken Greer.  (Actually, I
think I've seen exactly the same problem reported before in this newsgroup.)

Guido (not too awkward) van Rossum, CWI, Amsterdam         guido @ mcvax