This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 174040 - BEGINFILE/ENDFILE extension to gawk
BEGINFILE/ENDFILE extension to gawk
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gawk (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-23 19:13 EST by JW
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-24 02:41:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch adds BEGINFILE and ENDFILE statement blocks (6.96 KB, patch)
2005-11-23 19:15 EST, JW
no flags Details | Diff

  None (edit)
Description JW 2005-11-23 19:13:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
The following patch contains an extension to gawk adding BEGINFILE and ENDFILE blocks, much like BEGIN and END blocks.  These are really useful when processing a large number of files and variables need resetting for each file - rather than treating all files as just a single stream.


Version-Release number of selected component (if applicable):
gawk-3.1.4-5.3

How reproducible:
Always

Steps to Reproduce:
1.gawk 'BEGINFILE{sum=0;}{sum+=$1;}ENDFILE{print FILENAME,sum}' file1 file2 ...
2.
3.
  

Actual Results:  syntax error

Expected Results:  file1 100
file2 200
etc


Additional info:
Comment 1 JW 2005-11-23 19:15:08 EST
Created attachment 121425 [details]
patch adds BEGINFILE and ENDFILE statement blocks
Comment 2 Karel Zak 2005-11-24 02:41:13 EST
Thanks for your work, but -- please -- send your patch to upstream developers.
I'd like to keep minimal difference between upstream and RHEL/FC gawk code.
Comment 3 JW 2005-11-24 03:21:41 EST
(In reply to comment #2)
> Thanks for your work, but -- please -- send your patch to upstream developers.
> I'd like to keep minimal difference between upstream and RHEL/FC gawk code.

Did RH do that when RH inserted all the SELINUX stuff in pam code?

Note You need to log in before you can comment on or make changes to this bug.