bug#1064: [BusyBox] bug#1064: grep -v "^$" fails under mysterious circumstances

Matt Kraai kraai at alumni.carnegiemellon.edu
Fri Oct 13 19:02:28 UTC 2000


Howdy,

The ^$ is matching the zero-length space at the end of the line, after
the \n and before the \0.  The solution is to remove the \n and stop
compiling with REG_NEWLINE.  If you only remove REG_NEWLINE, this case
is fixed but then regular expressions like foo$ don't work.  And there
is no point to using REG_NEWLINE otherwise.

I've committed a patch to this effect.  A similar fix will be needed for
sed.

Matt





More information about the busybox mailing list