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:
Created attachment 121425 [details] patch adds BEGINFILE and ENDFILE statement blocks
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.
(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?