[buildroot 0000886]: awk does not call END if next is called on last last line of input and input file has no newline.

bugs at busybox.net bugs at busybox.net
Mon May 29 17:37:37 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=886 
====================================================================== 
Reported By:                limey
Assigned To:                uClibc
====================================================================== 
Project:                    buildroot
Issue ID:                   886
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             05-29-2006 10:27 PDT
Last Modified:              05-29-2006 10:37 PDT
====================================================================== 
Summary:                    awk does not call END if next is called on last last
line of input and input file has no newline.
Description: 
The END section of my awk script does not get called if i match the final
line of the input file, call next, and the input file does not end in a
new line. If I add new lines to the end of the input file, all is well. If
I do not call next after the match, all is well.

This is differnt to the result I get with the awk program shipped with
Fedora Core 4. 

====================================================================== 

---------------------------------------------------------------------- 
 limey - 05-29-06 10:37  
---------------------------------------------------------------------- 
Should be reproducable using the attached files:

./awk -f script.awk input_newline.txt
BEGIN
matched
END

./awk -f script.awk input_no_newline.txt
BEGIN
matched


The second with the no newline input does not produce END. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-29-06 10:27  limey          New Issue                                    
05-29-06 10:27  limey          Status                   new => assigned     
05-29-06 10:27  limey          Assigned To               => uClibc          
05-29-06 10:37  limey          Note Added: 0001387                          
======================================================================




More information about the uClibc-cvs mailing list