From f006165d77037b99e205496d8b79cb80e9f280c0 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 31 May 2018 12:57:02 +0300 Subject: Further fixes to extract.awk. --- doc/gawk.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc/gawk.texi') diff --git a/doc/gawk.texi b/doc/gawk.texi index 9a3c75fd..0d4c49a3 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -26728,7 +26728,7 @@ line. That line is then printed to the output file: @} if ($3 != curfile) @{ if (curfile != "") - filelist[curfile]++ # save to close later + filelist[curfile] = 1 # save to close later curfile = $3 @} @@ -26785,8 +26785,9 @@ is finished: @c file eg/prog/extract.awk @group END @{ - for (f in filelist) - close(filelist[f]) + close(curfile) # close the last one + for (f in filelist) # close all the rest + close(f) @} @end group @c endfile -- cgit v1.2.3