Subject: bug#17799: closed (Re: bug#17799: grep 2.5.4 ignoring parts of expression)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 18 Jun 2014 15:33:02 +0000

Your bug report

#17799: grep 2.5.4 ignoring parts of expression

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].

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

Subject: Re: bug#17799: grep 2.5.4 ignoring parts of expression
From: Paul Eggert <[email-masked]>
To: Jim Michaels <[email-masked]>, [email-masked]
Date: Wed, 18 Jun 2014 08:32:18 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Jim Michaels wrote:
> grep random "#include <(bits/)?random(\.h)?>" *
> expected: on the include/c++/bits dir of a gcc compiler should produce a couple of results.
>
> actual: produces pages and pages with just about every file in it. anything with the word random in it

That's because your command asked to find the word 'random'.  It's of 
the form:

grep random LIST-OF-FILE-NAMES

The first file name is "#include <(bits/)?random(\.h)?>", which grep 
complained to you about.

Subject: grep 2.5.4 ignoring parts of expression
From: Jim Michaels <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Wed, 18 Jun 2014 01:53:16 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

grep random "#include <(bits/)?random(\.h)?>" *
expected: on the include/c++/bits dir of a gcc compiler should produce a couple of results. 

actual: produces pages and pages with just about every file in it. anything with the word random in it. grep is ignoring #include <(bits/)? and (\.h)?> and I have no clue why.

all I wanted was the header files in the compiler which #included anything related to random.h because I had a bug in gcc I was trying to report, so I ended up finding a bug in grep too.

-------------
Jim Michaels
[email-masked]
[email-masked]
http://RenewalComputerServices.com
http://JesusnJim.com (my personal site, has software)
---
IEC Units: Computer RAM & SSD measurements, microsoft disk size measurements (note: they will say GB or MB or KB or TB when it is IEC Units!):
[KiB] [MiB] [GiB] [TiB]
[2^10B=1,024^1B=1KiB]
[2^20B=1,024^2B=1,048,576B=1MiB]
[2^30B=1,024^3B=1,073,741,824B=1GiB]
[2^40B=1,024^4B=1,099,511,627,776B=1TiB]
[2^50B=1,024^5B=1,125,899,906,842,624B=1PiB]
SI Units: Hard disk industry disk size measurements:

[kB] [MB] [GB] [TB]
[10^3B=1,000B=1kB]
[10^6B=1,000,000B=1MB]
[10^9B=1,000,000,000B=1GB]
[10^12B=1,000,000,000,000B=1TB]
[10^15B=1,000,000,000,000,000B=1PB]