[BusyBox] Sed rumblings...

Rob Landley rob at landley.net
Sat Sep 27 05:53:46 MDT 2003


load_cmd_file leaks filehandles.

gnu sed notices if the last line of a file has no newline, and thus if that 
line gets printed it will print that line with no newline, BUT if you have 
more than one input file it will put a newline between them.

It's possible to use have a search address of the form "1,\nfoon" and that 
first \n better not get turned into a newline.  Similarly:
$echo "only" | sed -e "s\nl\b\\"
oby

I'm about halfway through making all this work, but subtle little #*%(&#% 
things require ripping out huge sections of the code and redoing them.  
Moving all the \n parsing into the parse_blah_cmd ections.  And lots of 
cleanup.  And we weren't handling escapes in y (translate) properly anyway...

My brain hurts.

Rob

(And I found a bug in libbb: bb_get_chomped_line_from_file will eat the last 
character of a line that doesn't end in a newline.  I fixed it.)


More information about the busybox mailing list