From unknown Fri Aug 15 17:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17799: grep 2.5.4 ignoring parts of expression Resent-From: Jim Michaels Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 18 Jun 2014 11:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17799 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 17799@debbugs.gnu.org X-Debbugs-Original-To: "bug-grep@gnu.org" Reply-To: Jim Michaels Received: via spool by submit@debbugs.gnu.org id=B.140309257328478 (code B ref -1); Wed, 18 Jun 2014 11:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jun 2014 11:56:13 +0000 Received: from localhost ([127.0.0.1]:51202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxETJ-0007P4-9J for submit@debbugs.gnu.org; Wed, 18 Jun 2014 07:56:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49524) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxBcn-0001cO-E1 for submit@debbugs.gnu.org; Wed, 18 Jun 2014 04:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxBca-00053G-G9 for submit@debbugs.gnu.org; Wed, 18 Jun 2014 04:53:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxBca-000532-CM for submit@debbugs.gnu.org; Wed, 18 Jun 2014 04:53:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxBcT-00065T-1U for bug-grep@gnu.org; Wed, 18 Jun 2014 04:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxBcL-0004ug-T4 for bug-grep@gnu.org; Wed, 18 Jun 2014 04:53:24 -0400 Received: from nm22-vm1.bullet.mail.bf1.yahoo.com ([98.139.212.127]:38342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxBcL-0004ub-NE for bug-grep@gnu.org; Wed, 18 Jun 2014 04:53:17 -0400 Received: from [66.196.81.172] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 18 Jun 2014 08:53:16 -0000 Received: from [98.139.212.227] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 18 Jun 2014 08:53:16 -0000 Received: from [127.0.0.1] by omp1036.mail.bf1.yahoo.com with NNFMP; 18 Jun 2014 08:53:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 648023.7708.bm@omp1036.mail.bf1.yahoo.com Received: (qmail 49481 invoked by uid 60001); 18 Jun 2014 08:53:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1403081596; bh=tBPZ4AfISdiCb+zSoe7D3GIz3x9Umflu3O1Gf6x//sw=; h=Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=Xhn6X7pSFCwWu5odkOsK2klmsWx9Rne9vx3D2l36cfBsYSZlMTinHniO1ig8qtH0RvvdKJ32EkfjRLetSuwthZ23/TFk5FhR/0uYLF/Ja9i0u5cteuHZBYKRJ6VBvd6MUpnpuMZT+/aNeLozSdTM1VvqiPV47z2jQt10DEeClI4= X-YMail-OSG: EPK9XpsVM1kkkIS3_MCknoeVyc2oVo1sJucPYlR.X_E8Am7 jlxBjMJ1Kmt2gFolN_4Dk1KhcXcHAPl2LrDxPlKIIjxyoOTROBe2kEbZAwpc y3neoX.8VwtlQdu0zwP4SW8WhjNPc89hoTqBXVfVYHyOzEA62DKaL99w1f_3 7EOQ9hviRgR8d_v1hctcC7oH8ajuvWT_JPkEZh4LJYcqfjrERiSGLtkchlFo wCXwEU2FS_PiTB4r89GeYUSG9XEFkioyt..vk5YpoNiR2hv9lxoOwQLDviDz w_.tPzt4Cq3jMwZlrwUXsvt2xjU8MeV9IX3I9XE5J.AjI2.tkWqtIFi4AYGj a5WLOKQ_cN5uykbQNMvzSUMmm1InE6sWeHrX8tnCLoIuonO2_GvOncZrjRiJ 4HHi59K2RCNp459ge4CTmOv93F2N1LGhs1nepRHbEizfKrPDkEd3WxmiaeC3 fQaGfB7LUSsWlHlXI.ot1myP205qz.F3u8jnz9q_sSfN1sjXIU.VDmuZPaFD fnX4GHd2uF3ifdFDnopNGaVZTnYOGoyLP8UbMA1xIvP06jUyQefyTYCE8cYc TPhrxWZtGkr8uB2GnkYbqLFaIcRM56LwK8XqUIUDLSOXv3_DRj4b6Yn5a1Sq AVHdmsr3LCHZMa2QN2Bjwbb5xeJM2C7PrpbkTbsWQlAYCMZ6cn1XUPpI1H_N sAxRPM9.yd5G_xAU- Received: from [71.59.228.22] by web161505.mail.bf1.yahoo.com via HTTP; Wed, 18 Jun 2014 01:53:16 PDT X-Rocket-MIMEInfo: 002.001, Z3JlcCByYW5kb20gIiNpbmNsdWRlIDwoYml0cy8pP3JhbmRvbShcLmgpPz4iICoKZXhwZWN0ZWQ6IG9uIHRoZSBpbmNsdWRlL2MrKy9iaXRzIGRpciBvZiBhIGdjYyBjb21waWxlciBzaG91bGQgcHJvZHVjZSBhIGNvdXBsZSBvZiByZXN1bHRzLiAKCmFjdHVhbDogcHJvZHVjZXMgcGFnZXMgYW5kIHBhZ2VzIHdpdGgganVzdCBhYm91dCBldmVyeSBmaWxlIGluIGl0LiBhbnl0aGluZyB3aXRoIHRoZSB3b3JkIHJhbmRvbSBpbiBpdC4gZ3JlcCBpcyBpZ25vcmluZyAjaW5jbHVkZSA8KGJpdHMvKT8gYW5kIChcLmgBMAEBAQE- X-Mailer: YahooMailWebService/0.8.190.668 Message-ID: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> Date: Wed, 18 Jun 2014 01:53:16 -0700 From: Jim Michaels MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1679980782-2133082519-1403081596=:45920" X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Mailman-Approved-At: Wed, 18 Jun 2014 07:56:02 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --1679980782-2133082519-1403081596=:45920 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable grep random "#include <(bits/)?random(\.h)?>" *=0Aexpected: on the include/= c++/bits dir of a gcc compiler should produce a couple of results. =0A=0Aac= tual: produces pages and pages with just about every file in it. anything w= ith the word random in it. grep is ignoring #include <(bits/)? and (\.h)?> = and I have no clue why.=0A=0Aall I wanted was the header files in the compi= ler 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.=0A=0A=0A= =A0=0A-------------=0AJim Michaels=0AJmichae3@yahoo.com=0AJimM@RenewalCompu= terServices.com=0Ahttp://RenewalComputerServices.com=0Ahttp://JesusnJim.com= (my personal site, has software)=0A---=0AIEC Units: Computer RAM & SSD mea= surements, microsoft disk size measurements (note: they will say GB or MB o= r KB or TB when it is IEC Units!):=0A[KiB] [MiB] [GiB] [TiB]=0A[2^10B=3D1,0= 24^1B=3D1KiB]=0A[2^20B=3D1,024^2B=3D1,048,576B=3D1MiB]=0A[2^30B=3D1,024^3B= =3D1,073,741,824B=3D1GiB]=0A[2^40B=3D1,024^4B=3D1,099,511,627,776B=3D1TiB]= =0A[2^50B=3D1,024^5B=3D1,125,899,906,842,624B=3D1PiB]=0ASI Units: Hard disk= industry disk size measurements:=0A=0A[kB] [MB] [GB] [TB]=0A[10^3B=3D1,000= B=3D1kB]=0A[10^6B=3D1,000,000B=3D1MB]=0A[10^9B=3D1,000,000,000B=3D1GB]=0A[1= 0^12B=3D1,000,000,000,000B=3D1TB]=0A[10^15B=3D1,000,000,000,000,000B=3D1PB] --1679980782-2133082519-1403081596=:45920 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
grep random "#include <(bi= ts/)?random(\.h)?>" *
expected: on the include/c++/bits dir of a gcc compil= er should produce a couple of results.
actual: produces pages and pages w= ith 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
Jmichae3@yahoo.com
JimM@RenewalComputerServ= ices.com
http://= RenewalComputerServices.com
http://JesusnJim.com (my personal site= , has software)
---
IEC U= nits: 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=3D1,024^1B=3D1KiB]
[2^20B=3D1,024^2B=3D1,0= 48,576B=3D1MiB]
[2^30B=3D1,024^3B=3D1,073,741,824B= =3D1GiB]
[2^40B=3D1,024^4B=3D1,099,511,627,776B=3D= 1TiB]
[2^50B=3D1,024^5B=3D1,125,899,906,842,624B= =3D1PiB]
SI Units: Hard disk industry disk size me= asurements:
[kB] [MB] [GB] [TB]
[10^3B=3D1,000B=3D1kB]
[10^6B= =3D1,000,000B=3D1MB]
[10^9B=3D1,000,000,000B=3D1GB= ]
[10^12B=3D1,000,000,000,000B=3D1TB]
[10^15B=3D1,000,000,000,000,000B=3D1PB]
<= br style=3D"" class=3D"">
--1679980782-2133082519-1403081596=:45920-- From unknown Fri Aug 15 17:24:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jim Michaels Subject: bug#17799: closed (Re: bug#17799: grep 2.5.4 ignoring parts of expression) Message-ID: References: <53A1B102.7050402@cs.ucla.edu> <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> X-Gnu-PR-Message: they-closed 17799 X-Gnu-PR-Package: grep Reply-To: 17799@debbugs.gnu.org Date: Wed, 18 Jun 2014 15:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1403105582-22642-1" This is a multi-part message in MIME format... ------------=_1403105582-22642-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 17799@debbugs.gnu.org. --=20 17799: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17799 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1403105582-22642-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17799-done) by debbugs.gnu.org; 18 Jun 2014 15:32:48 +0000 Received: from localhost ([127.0.0.1]:51917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxHqt-0005sa-38 for submit@debbugs.gnu.org; Wed, 18 Jun 2014 11:32:47 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:36659) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxHqn-0005sF-DM for 17799-done@debbugs.gnu.org; Wed, 18 Jun 2014 11:32:42 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id F19B1A60001; Wed, 18 Jun 2014 08:32:30 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pIxuCD5zoIzA; Wed, 18 Jun 2014 08:32:22 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3E26C39E8013; Wed, 18 Jun 2014 08:32:22 -0700 (PDT) Message-ID: <53A1B102.7050402@cs.ucla.edu> Date: Wed, 18 Jun 2014 08:32:18 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Jim Michaels , 17799-done@debbugs.gnu.org Subject: Re: bug#17799: grep 2.5.4 ignoring parts of expression References: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> In-Reply-To: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 17799-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. ------------=_1403105582-22642-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Jun 2014 11:56:13 +0000 Received: from localhost ([127.0.0.1]:51202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxETJ-0007P4-9J for submit@debbugs.gnu.org; Wed, 18 Jun 2014 07:56:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49524) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxBcn-0001cO-E1 for submit@debbugs.gnu.org; Wed, 18 Jun 2014 04:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxBca-00053G-G9 for submit@debbugs.gnu.org; Wed, 18 Jun 2014 04:53:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxBca-000532-CM for submit@debbugs.gnu.org; Wed, 18 Jun 2014 04:53:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxBcT-00065T-1U for bug-grep@gnu.org; Wed, 18 Jun 2014 04:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxBcL-0004ug-T4 for bug-grep@gnu.org; Wed, 18 Jun 2014 04:53:24 -0400 Received: from nm22-vm1.bullet.mail.bf1.yahoo.com ([98.139.212.127]:38342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxBcL-0004ub-NE for bug-grep@gnu.org; Wed, 18 Jun 2014 04:53:17 -0400 Received: from [66.196.81.172] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 18 Jun 2014 08:53:16 -0000 Received: from [98.139.212.227] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 18 Jun 2014 08:53:16 -0000 Received: from [127.0.0.1] by omp1036.mail.bf1.yahoo.com with NNFMP; 18 Jun 2014 08:53:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 648023.7708.bm@omp1036.mail.bf1.yahoo.com Received: (qmail 49481 invoked by uid 60001); 18 Jun 2014 08:53:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1403081596; bh=tBPZ4AfISdiCb+zSoe7D3GIz3x9Umflu3O1Gf6x//sw=; h=Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=Xhn6X7pSFCwWu5odkOsK2klmsWx9Rne9vx3D2l36cfBsYSZlMTinHniO1ig8qtH0RvvdKJ32EkfjRLetSuwthZ23/TFk5FhR/0uYLF/Ja9i0u5cteuHZBYKRJ6VBvd6MUpnpuMZT+/aNeLozSdTM1VvqiPV47z2jQt10DEeClI4= X-YMail-OSG: EPK9XpsVM1kkkIS3_MCknoeVyc2oVo1sJucPYlR.X_E8Am7 jlxBjMJ1Kmt2gFolN_4Dk1KhcXcHAPl2LrDxPlKIIjxyoOTROBe2kEbZAwpc y3neoX.8VwtlQdu0zwP4SW8WhjNPc89hoTqBXVfVYHyOzEA62DKaL99w1f_3 7EOQ9hviRgR8d_v1hctcC7oH8ajuvWT_JPkEZh4LJYcqfjrERiSGLtkchlFo wCXwEU2FS_PiTB4r89GeYUSG9XEFkioyt..vk5YpoNiR2hv9lxoOwQLDviDz w_.tPzt4Cq3jMwZlrwUXsvt2xjU8MeV9IX3I9XE5J.AjI2.tkWqtIFi4AYGj a5WLOKQ_cN5uykbQNMvzSUMmm1InE6sWeHrX8tnCLoIuonO2_GvOncZrjRiJ 4HHi59K2RCNp459ge4CTmOv93F2N1LGhs1nepRHbEizfKrPDkEd3WxmiaeC3 fQaGfB7LUSsWlHlXI.ot1myP205qz.F3u8jnz9q_sSfN1sjXIU.VDmuZPaFD fnX4GHd2uF3ifdFDnopNGaVZTnYOGoyLP8UbMA1xIvP06jUyQefyTYCE8cYc TPhrxWZtGkr8uB2GnkYbqLFaIcRM56LwK8XqUIUDLSOXv3_DRj4b6Yn5a1Sq AVHdmsr3LCHZMa2QN2Bjwbb5xeJM2C7PrpbkTbsWQlAYCMZ6cn1XUPpI1H_N sAxRPM9.yd5G_xAU- Received: from [71.59.228.22] by web161505.mail.bf1.yahoo.com via HTTP; Wed, 18 Jun 2014 01:53:16 PDT X-Rocket-MIMEInfo: 002.001, Z3JlcCByYW5kb20gIiNpbmNsdWRlIDwoYml0cy8pP3JhbmRvbShcLmgpPz4iICoKZXhwZWN0ZWQ6IG9uIHRoZSBpbmNsdWRlL2MrKy9iaXRzIGRpciBvZiBhIGdjYyBjb21waWxlciBzaG91bGQgcHJvZHVjZSBhIGNvdXBsZSBvZiByZXN1bHRzLiAKCmFjdHVhbDogcHJvZHVjZXMgcGFnZXMgYW5kIHBhZ2VzIHdpdGgganVzdCBhYm91dCBldmVyeSBmaWxlIGluIGl0LiBhbnl0aGluZyB3aXRoIHRoZSB3b3JkIHJhbmRvbSBpbiBpdC4gZ3JlcCBpcyBpZ25vcmluZyAjaW5jbHVkZSA8KGJpdHMvKT8gYW5kIChcLmgBMAEBAQE- X-Mailer: YahooMailWebService/0.8.190.668 Message-ID: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> Date: Wed, 18 Jun 2014 01:53:16 -0700 From: Jim Michaels Subject: grep 2.5.4 ignoring parts of expression To: "bug-grep@gnu.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1679980782-2133082519-1403081596=:45920" X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 18 Jun 2014 07:56:02 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Jim Michaels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --1679980782-2133082519-1403081596=:45920 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable grep random "#include <(bits/)?random(\.h)?>" *=0Aexpected: on the include/= c++/bits dir of a gcc compiler should produce a couple of results. =0A=0Aac= tual: produces pages and pages with just about every file in it. anything w= ith the word random in it. grep is ignoring #include <(bits/)? and (\.h)?> = and I have no clue why.=0A=0Aall I wanted was the header files in the compi= ler 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.=0A=0A=0A= =A0=0A-------------=0AJim Michaels=0AJmichae3@yahoo.com=0AJimM@RenewalCompu= terServices.com=0Ahttp://RenewalComputerServices.com=0Ahttp://JesusnJim.com= (my personal site, has software)=0A---=0AIEC Units: Computer RAM & SSD mea= surements, microsoft disk size measurements (note: they will say GB or MB o= r KB or TB when it is IEC Units!):=0A[KiB] [MiB] [GiB] [TiB]=0A[2^10B=3D1,0= 24^1B=3D1KiB]=0A[2^20B=3D1,024^2B=3D1,048,576B=3D1MiB]=0A[2^30B=3D1,024^3B= =3D1,073,741,824B=3D1GiB]=0A[2^40B=3D1,024^4B=3D1,099,511,627,776B=3D1TiB]= =0A[2^50B=3D1,024^5B=3D1,125,899,906,842,624B=3D1PiB]=0ASI Units: Hard disk= industry disk size measurements:=0A=0A[kB] [MB] [GB] [TB]=0A[10^3B=3D1,000= B=3D1kB]=0A[10^6B=3D1,000,000B=3D1MB]=0A[10^9B=3D1,000,000,000B=3D1GB]=0A[1= 0^12B=3D1,000,000,000,000B=3D1TB]=0A[10^15B=3D1,000,000,000,000,000B=3D1PB] --1679980782-2133082519-1403081596=:45920 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
grep random "#include <(bi= ts/)?random(\.h)?>" *
expected: on the include/c++/bits dir of a gcc compil= er should produce a couple of results.
actual: produces pages and pages w= ith 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
Jmichae3@yahoo.com
JimM@RenewalComputerServ= ices.com
http://= RenewalComputerServices.com
http://JesusnJim.com (my personal site= , has software)
---
IEC U= nits: 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=3D1,024^1B=3D1KiB]
[2^20B=3D1,024^2B=3D1,0= 48,576B=3D1MiB]
[2^30B=3D1,024^3B=3D1,073,741,824B= =3D1GiB]
[2^40B=3D1,024^4B=3D1,099,511,627,776B=3D= 1TiB]
[2^50B=3D1,024^5B=3D1,125,899,906,842,624B= =3D1PiB]
SI Units: Hard disk industry disk size me= asurements:
[kB] [MB] [GB] [TB]
[10^3B=3D1,000B=3D1kB]
[10^6B= =3D1,000,000B=3D1MB]
[10^9B=3D1,000,000,000B=3D1GB= ]
[10^12B=3D1,000,000,000,000B=3D1TB]
[10^15B=3D1,000,000,000,000,000B=3D1PB]
<= br style=3D"" class=3D"">
--1679980782-2133082519-1403081596=:45920-- ------------=_1403105582-22642-1-- From unknown Fri Aug 15 17:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17799: grep 2.5.4 ignoring parts of expression Resent-From: Norihiro Tanaka Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 18 Jun 2014 15:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17799 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Jim Michaels Cc: 17799@debbugs.gnu.org Received: via spool by 17799-submit@debbugs.gnu.org id=B17799.140310581823044 (code B ref 17799); Wed, 18 Jun 2014 15:37:01 +0000 Received: (at 17799) by debbugs.gnu.org; 18 Jun 2014 15:36:58 +0000 Received: from localhost ([127.0.0.1]:51924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxHuw-0005zX-7e for submit@debbugs.gnu.org; Wed, 18 Jun 2014 11:36:58 -0400 Received: from mailgw05.kcn.ne.jp ([61.86.7.212]:52139) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxHuq-0005zA-Ot for 17799@debbugs.gnu.org; Wed, 18 Jun 2014 11:36:52 -0400 Received: from imp01 (mailgw5.kcn.ne.jp [61.86.15.231]) by mailgw05.kcn.ne.jp (Postfix) with ESMTP id 8504967A98 for <17799@debbugs.gnu.org>; Thu, 19 Jun 2014 00:36:41 +0900 (JST) Received: from mail09.kcn.ne.jp ([61.86.6.188]) by imp01 with bizsmtp id Frch1o00B43QJrh01rchor; Thu, 19 Jun 2014 00:36:41 +0900 X-OrgRCPT: 17799@debbugs.gnu.org Received: from [10.120.1.47] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail09.kcn.ne.jp (Postfix) with ESMTPA id 10B8E1BD0097; Thu, 19 Jun 2014 00:36:41 +0900 (JST) Date: Thu, 19 Jun 2014 00:36:41 +0900 From: Norihiro Tanaka In-Reply-To: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> References: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> Message-Id: <20140619003640.1DF4.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) If you don't specify any options, grep regards a pattern as BRE. http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03 (', `)' and `?' are treated as normal character in BRE. If you expect that they are treated as special character, you must escape them with backslash. BTW, I see you want to use ERE. http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04 If so, you must specify -E option. I test below on Fedora 20. $ cd /usr/include/c++/4.8.2 $ grep -E "#include <(bits/)?random(\.h)?>" * 2>/dev/null $ grep "#include <(bits/)?random(\.h)?>" * 2>/dev/null random:#include From unknown Fri Aug 15 17:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17799: grep 2.5.4 ignoring parts of expression Resent-From: Sekar Sundaram Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 20 Jun 2014 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17799 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 17799@debbugs.gnu.org, eggert@cs.ucla.edu, jmichae3@yahoo.com Received: via spool by 17799-submit@debbugs.gnu.org id=B17799.140324899416694 (code B ref 17799); Fri, 20 Jun 2014 07:24:02 +0000 Received: (at 17799) by debbugs.gnu.org; 20 Jun 2014 07:23:14 +0000 Received: from localhost ([127.0.0.1]:53696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxtAG-0004L8-Q5 for submit@debbugs.gnu.org; Fri, 20 Jun 2014 03:23:13 -0400 Received: from mail-oa0-f46.google.com ([209.85.219.46]:47374) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxhHL-00071m-Lt for 17799@debbugs.gnu.org; Thu, 19 Jun 2014 14:41:44 -0400 Received: by mail-oa0-f46.google.com with SMTP id m1so6000109oag.19 for <17799@debbugs.gnu.org>; Thu, 19 Jun 2014 11:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Na/KIDlQZD4pLGR5Axz6Q6v/sydmLBKMiq4U6AC3yIg=; b=CpLVQpp4+y9fPNt/joNJO0y9ThscWeRn/qQhkK+PR7tCdZuQpFuArkMfZTRMCe9J2u VEyAYYM7+bBty2JG57eQ6ctqzmwHHKk86ytZ0m/Bl8345+EiZ583Tth51/t0OW+JbSMf m5k7eAxGVQ5bsIUbf1cGq4q2gsnyqvJm/4QWj96xqhF4Aeo+JYicRVeU3PBI0XW6c+Jr F4ocZ5k987jNUbX1bG+3N4uMLaY/9p6ysxHe9qsg/a7RXjiYUYMiCtQqPOfmgdMSRgdl Jh/FoLd96hK+1wbZ+hANICvJCUIbcRySLG49mIesFKrIibz1F5dUNurMuaEAmAsEFe4M Guhg== MIME-Version: 1.0 X-Received: by 10.182.66.170 with SMTP id g10mr6353503obt.49.1403203297796; Thu, 19 Jun 2014 11:41:37 -0700 (PDT) Received: by 10.182.29.226 with HTTP; Thu, 19 Jun 2014 11:41:37 -0700 (PDT) In-Reply-To: <53A1B102.7050402@cs.ucla.edu> References: <1403081596.45920.YahooMailNeo@web161505.mail.bf1.yahoo.com> <53A1B102.7050402@cs.ucla.edu> Date: Thu, 19 Jun 2014 13:41:37 -0500 Message-ID: From: Sekar Sundaram Content-Type: multipart/alternative; boundary=001a11c1ed8a1cea0e04fc34ba5c X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Fri, 20 Jun 2014 03:23:09 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c1ed8a1cea0e04fc34ba5c Content-Type: text/plain; charset=UTF-8 Hi Jim, Lets say i want to search for "#include " (on my machine, i could not find any random.h under c++ directory) and this below grep command works fine for me.. dev-RH: root - redhat[/usr/include/c++/4.1.1] *# grep -r "#include " ** backward/alloc.h:#include backward/function.h:#include backward/heap.h:#include backward/pair.h:#include ..... ..... maybe, lets search random.h under all subdirectories(-r) and only one output per file(-m 1) will ok, to avoid screen full of texts. *grep -r -m 1 "random.h" * * Let us know if still you are facing any issues. Have a great day! *Best Regards,* *Sekar * *The smallest things can have the biggest impact. Look inside. - Intel* On Wed, Jun 18, 2014 at 10:32 AM, Paul Eggert wrote: > 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. > > > > --001a11c1ed8a1cea0e04fc34ba5c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Jim,=C2=A0
Lets say i want to search for "#inc= lude <bits/c++config.h>" (on my machine, i could not find any ra= ndom.h under c++ directory) and this below grep command works fine for me..=

dev-RH: root - redhat[/usr/include/c++/4.1.1]
# grep -r "#include <bits/c++config.h>" *
backward/alloc.h:#include <bits/c++config.h>
backward= /function.h:#include <bits/c++config.h>
backward/heap.h:#include <bits/c++config.h>
backward/p= air.h:#include <bits/c++config.h> =C2=A0
.....=C2= =A0
.....

maybe, lets search random.h un= der all subdirectories(-r) and only one output per file(-m 1) will ok, to a= void screen full of texts.
grep -r -m 1 "random.h" *=C2=A0

<= /div>
Let us know if still you are facing any issues.=C2=A0
<= br>
Have a great day!

Best Regards,

Sekar

The smallest things can have the biggest impact. Look inside. - Intel




On Wed, Jun 18, 2014 at 10:32 AM, Paul Eggert <eggert@cs.ucla.edu>= ; wrote:
Jim Michaels wrote:
grep random "#include <(bits/)?random(\.h)?>" *
expected: on the include/c++/bits dir of a gcc compiler should produce a co= uple 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'. = =C2=A0It's of the form:

grep random LIST-OF-FILE-NAMES

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




--001a11c1ed8a1cea0e04fc34ba5c--