GNU bug report logs - #30652
Empty lines when using color and searching through files with DOS newline

Previous Next

Package: grep;

Reported by: DrSlony <entertheyoni <at> gmail.com>

Date: Wed, 28 Feb 2018 16:00:04 UTC

Severity: wishlist

Merged with 30535

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: DrSlony <entertheyoni <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: Empty lines when using color and searching through files with DOS
 newline
Date: Wed, 28 Feb 2018 12:06:45 +0100
[Message part 1 (text/plain, inline)]
Hello

Today I ran into this very old bug where grep returns empty lines when
grepping through files with DOS-style \r\n newlines.

To reproduce:
grep "foo.*" *.txt

Verify that it does in fact find things:
grep "popup.*" *.bas | od -c

This prints the lines correctly:
grep --color=never "foo.*" *.txt

I found a report of this issue at least from 2009:
http://savannah.gnu.org/bugs/?25539

I'm using GNU grep 3.1.

Kind regards
DrSlony
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.