Awk bug+fix -- Do Not Install This "Fix"!
Guido van Rossum
guido at mcvax.UUCP
Tue Mar 6 01:17:07 AEST 1984
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
More information about the Comp.unix.wizards
mailing list