bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep -P


From: Souchick, Michael P
Subject: grep -P
Date: Wed, 25 Jul 2012 19:45:35 +0000

Hello,

I've tested the "grep -P" option on a model output of 10 GB.  The output 
consists of multi-line records, and I've used several variations of similar 
type commands:

Grep  -P "(?s)FIRES\-.*?;" filename

Grep  -P "(?s)\-INTERCEPTS.*?;" filename

Grep  -P "(?s)FIRES\-.*?(?=\n  \d)" filename

In all cases, comparison with the results from doing single-line grep command:

Grep  FIRES\- filename

Grep  \-INTERCEPTS filename

Grep  FIRES\- filename

Reveal dropping of a small percentage of output incidents that should have been 
matched.  Examination of the file showed nothing unusual with the dropped 
entries that would cause them to fail.
Because of this bug, the grep -P command cannot be used for accurate 
tabulations.

Has anyone reported such a bug?  Has it been corrected in later versions?

The grep -V command displays:
GNU  grep 2.5.1

Michael Souchick








reply via email to

[Prev in Thread] Current Thread [Next in Thread]