Subject: bug#25693: closed (Re: bug#25693: -A and mixed line terminators)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 12 Feb 2017 07:45:02 +0000

Your bug report

#25693: -A and mixed line terminators

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
25693: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25693
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#25693: -A and mixed line terminators
From: Paul Eggert <[email-masked]>
To: Norbert de Jonge <[email-masked]>, [email-masked]
Date: Sat, 11 Feb 2017 23:44:30 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Norbert de Jonge wrote:
> I'm requesting 10000 lines of trailing context, which is more lines
> than the entire file, but output is prematurely cut off.

The last line of output is "Binary file 4a.html matches", which indicates that 
the output would otherwise have data that is improperly encoded for your locale. 
Try using the -a option, or use the C locale (set LC_ALL=C in your environment).

Subject: -A and mixed line terminators
From: Norbert de Jonge <[email-masked]>
To: [email-masked]
Date: Sun, 12 Feb 2017 03:14:18 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I don't know if this is a bug or not, but -A does not seem to properly
deal with mixed line terminators.

Here's a way to replicate the issue.

$ wget http://www.popot.org/popuw_forum_archive/4a.html
$ file 4a.html
$ wc -l 4a.html
$ grep -A 10000 tul 4a.html
$ tail 4a.html

I'm requesting 10000 lines of trailing context, which is more lines
than the entire file, but output is prematurely cut off.

Best regards,
Norbert