GNU bug report logs - #25693
-A and mixed line terminators

Previous Next

Package: grep;

Reported by: Norbert de Jonge <mail <at> norbertdejonge.nl>

Date: Sun, 12 Feb 2017 02:15:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25693 in the body.
You can then email your comments to 25693 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#25693; Package grep. (Sun, 12 Feb 2017 02:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Norbert de Jonge <mail <at> norbertdejonge.nl>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sun, 12 Feb 2017 02:15:02 GMT) Full text and rfc822 format available.

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

From: Norbert de Jonge <mail <at> norbertdejonge.nl>
To: bug-grep <at> gnu.org
Subject: -A and mixed line terminators
Date: Sun, 12 Feb 2017 03:14:18 +0100
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




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 12 Feb 2017 07:45:01 GMT) Full text and rfc822 format available.

Notification sent to Norbert de Jonge <mail <at> norbertdejonge.nl>:
bug acknowledged by developer. (Sun, 12 Feb 2017 07:45:02 GMT) Full text and rfc822 format available.

Message #10 received at 25693-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norbert de Jonge <mail <at> norbertdejonge.nl>, 25693-done <at> debbugs.gnu.org
Subject: Re: bug#25693: -A and mixed line terminators
Date: Sat, 11 Feb 2017 23:44:30 -0800
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).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Mar 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 105 days ago.

Previous Next


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