Mail Archives: djgpp/2015/11/07/12:18:25
> Date: Sat, 7 Nov 2015 08:27:26 -0800 (PST)
> From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
>
> > > null-byte: failed test: -a '\0$' does not match '\0'
> >
> > Isn't this an EOL issue? The input file have the DOS CR-LF EOL, but
> > the null byte will AFAIR cause Grep to consider the file as binary,
> > and thus not strip the CR characters from the end of line. Then \0$
> > won't match because the character after the null byte is \r, not \n.
> >
> > What happens if you convert 'in' to Unix EOL format?
>
> You are right, if I change the in file into UNIX format then the check passes. But then I fear I have not really understood what the function of null-byte shall be on DOS/WINDOWS or any other OS with EOL different from UNIX format.
It is supposed to test a fix for a bug, see
http://lists.gnu.org/archive/html/bug-grep/2014-04/msg00147.html
Evidently, a null byte was considered an end-of-line marker even if
the -z option was not given.
- Raw text -