BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000886 [buildroot] Other major always 05-29-06 10:27 02-12-07 05:44
Reporter limey View Status public  
Assigned To buildroot
Priority normal Resolution unable to reproduce  
Status closed   Product Version 0.9.27
Summary 0000886: 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.
Additional Information
Attached Files  input_newline.txt [^] (10 bytes) 05-29-06 10:38
 input_no_newline.txt [^] (7 bytes) 05-29-06 10:38
 script.awk [^] (92 bytes) 05-29-06 10:38
 script_no_next.awk [^] (82 bytes) 05-29-06 10:41

- Relationships

- Notes
(0001387)
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.
 
(0001388)
limey
05-29-06 10:42

And to show how calling/not calling next effects this:

./awk -f script_no_next.awk input_no_newline.txt
BEGIN
matched
END


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


The END section gets called this time.
 
(0001539)
vapier
07-19-06 17:05

no idea what awk you're talking about, but assuming you're talking about busybox's awk, busybox-1.2.0's awk works just fine with your example scripts
 

- 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
05-29-06 10:38 limey File Added: input_newline.txt
05-29-06 10:38 limey File Added: input_no_newline.txt
05-29-06 10:38 limey File Added: script.awk
05-29-06 10:41 limey File Added: script_no_next.awk
05-29-06 10:42 limey Note Added: 0001388
05-29-06 10:42 limey Issue Monitored: limey
07-19-06 17:05 vapier Note Added: 0001539
07-19-06 17:05 vapier Status assigned => closed
07-19-06 17:05 vapier Resolution open => unable to reproduce
02-12-07 05:44 vapier Status closed => assigned
02-12-07 05:44 vapier Assigned To uClibc => buildroot


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker