diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-05-31 12:59:16 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-05-31 12:59:16 +0300 |
commit | bc61f29c492b480545ae31b4b5709f76fe3710b0 (patch) | |
tree | 0d4989b4bcca2c94fc59c526fcf476912ab78a49 /awklib/extract.awk | |
parent | b8213e3abbd39a851b1510b39b7155b022b02d99 (diff) | |
parent | be0e2af1588b358353941eff27c5ef06da2c90b3 (diff) | |
download | egawk-bc61f29c492b480545ae31b4b5709f76fe3710b0.tar.gz egawk-bc61f29c492b480545ae31b4b5709f76fe3710b0.tar.bz2 egawk-bc61f29c492b480545ae31b4b5709f76fe3710b0.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'awklib/extract.awk')
-rw-r--r-- | awklib/extract.awk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/awklib/extract.awk b/awklib/extract.awk index 96fc9498..0c20e299 100644 --- a/awklib/extract.awk +++ b/awklib/extract.awk @@ -30,7 +30,7 @@ BEGIN { IGNORECASE = 1 } } if ($3 != curfile) { if (curfile != "") - filelist[curfile]++ # save to close later + filelist[curfile] = 1 # save to close later curfile = $3 } @@ -61,8 +61,9 @@ BEGIN { IGNORECASE = 1 } } } END { - for (f in filelist) - close(filelist[f]) + close(curfile) # close the last one + for (f in filelist) # close all the rest + close(f) } function unexpected_eof() { |