GNU bug report logs -
#23965
egrep should report line number when failing to parse a file (with -f)
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 25 Jul 2016 23:00:35 -0700
with message-id <CA+8g5KGDd3+k9GUoZ8rMN+CmttV_wUzdB_zTTzGJ3g-v4qP9Mg <at> mail.gmail.com>
and subject line Re: bug#23965: egrep should report line number when failing to parse a file (with -f)
has caused the debbugs.gnu.org bug report #23965,
regarding egrep should report line number when failing to parse a file (with -f)
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
23965: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23965
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi,
Please find below yet another old-standing bug filed against debian.
grep's behaviour is still the same in 2.25.
https://bugs.debian.org/525214
Cheers,
Santiago
----- Forwarded message from Gunnar Wolf <gwolf <at> gwolf.org> -----
Date: Wed, 22 Apr 2009 18:06:28 -0500
From: Gunnar Wolf <gwolf <at> gwolf.org>
To: Debian Bug Tracking System <submit <at> bugs.debian.org>
Subject: egrep should report line number when failing to parse a file (with -f)
X-Mailer: reportbug 4.1
[...]
egrep -f takes its input from a file. This functionality is often used
i.e. with logcheck, which works basically off a directory full of
files which contain regexes representing log messages to be either
ignored or pushed up - However, when something goes bad and one of
those lines is not parsable, grep won't help in debugging. As an
example, I got loads of log messages such as:
From: Cron Daemon <root <at> iiec.unam.mx>
To: root <at> iiec.unam.mx
Date: Tue, 21 Apr 2009 23:02:02 -0500 (CDT)
Subject: Cron <logcheck <at> lafa> if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
egrep: Unmatched [ or [^
Finding the file/line where I made this particular mistake was a
tedious job. Users deserve egrep to report the filename and line
number where this error happened.
[...]
----- End forwarded message -----
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
On Mon, Jul 25, 2016 at 11:56 AM, Santiago Ruano Rincón
<santiagorr <at> riseup.net> wrote:
> El 23/07/16 a las 09:31, Jim Meyering escribió:
>> On Wed, Jul 20, 2016 at 2:58 PM, Jim Meyering <jim <at> meyering.net> wrote:
>> > On Wed, Jul 13, 2016 at 1:59 AM, Santiago Ruano Rincón
>> > <santiagorr <at> riseup.net> wrote:
>
> …
>
>> Here are two patches.
>> The first adds coreutils' perl-based test harness to grep.
>> The second improves those diagnostics and adds a test using the new harness:
>
> Thanks!
>
> I will include it in the next grep debian release.
Nice.
I've added a couple more tests and pushed as
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=f13c169e13aed279baa00d9ced9d93fe24775493
This bug report was last modified 8 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.