From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MM0w8-0007rn-WD for garchives@archives.gentoo.org; Wed, 01 Jul 2009 14:37:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 897BAE04BC; Wed, 1 Jul 2009 14:37:23 +0000 (UTC) Received: from mux2-unibi-smtp.hrz.uni-bielefeld.de (mux2-unibi-smtp.hrz.uni-bielefeld.de [129.70.204.73]) by pigeon.gentoo.org (Postfix) with ESMTP id 5FC62E04D3 for ; Wed, 1 Jul 2009 14:37:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-version: 1.0 Received: from pmxchannel-daemon.mux2-unibi-smtp.hrz.uni-bielefeld.de by mux2-unibi-smtp.hrz.uni-bielefeld.de (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) id <0KM300H00XY8VC00@mux2-unibi-smtp.hrz.uni-bielefeld.de> for gentoo-user@lists.gentoo.org; Wed, 01 Jul 2009 16:37:21 +0200 (CEST) Received: from sargeras.localnet ([77.176.62.216]) by mux2-unibi-smtp.hrz.uni-bielefeld.de (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPPSA id <0KM300G9DXY8ZR10@mux2-unibi-smtp.hrz.uni-bielefeld.de> for gentoo-user@lists.gentoo.org; Wed, 01 Jul 2009 16:37:20 +0200 (CEST) Date: Wed, 01 Jul 2009 16:37:15 +0200 From: Patrick Holthaus Subject: Re: [gentoo-user] Is grep broken? In-reply-to: <200907011530.26396.peter@humphrey.ukfsn.org> To: gentoo-user@lists.gentoo.org Message-id: <25387_1246459040_ZZg0y5H4OmC7y.00_200907011637.19681.patrick.holthaus@uni-bielefeld.de> Content-type: multipart/signed; boundary=nextPart1728139.SApZIxsCCu; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-transfer-encoding: 7bit X-EnvFrom: patrick.holthaus@uni-bielefeld.de X-PMX-Version: 5.5.1.360522, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.7.1.142416, pmx9 X-Connecting-IP: 77.176.62.216 References: <200907011530.26396.peter@humphrey.ukfsn.org> User-Agent: KMail/1.11.4 (Linux/2.6.30-gentoo-r1; KDE/4.2.4; i686; ; ) X-Archives-Salt: bfb171f2-99ed-487b-b6b2-2e011b86ecca X-Archives-Hash: f0ea3c1cf3c0c30382ba0a412b85247c --nextPart1728139.SApZIxsCCu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 01 July 2009 16:30:26 Peter Humphrey wrote: > Hello list, > > Can anyone explain this to me? > > $ /bin/grep -r hmenu *html > index.html:
> master.html:
> pictures.html:
The star is evaluated /before/ grep is executed. Therefore, only files that= are=20 ending with html are searched recursively. If you had placed the files in a= =20 directory called blablahtml, then grep would have searched there. > $ /bin/grep -r hmenu pages/*html > pages/community.html:
> pages/contacts.html:
> pages/history.html:
> pages/music.html:
> pages/news.html:
> pages/people.html:
> pages/pictures.html:
> > Grep is clearly disobeying the recursion command. I started noticing this= a > few days ago, and it's making maintenance of this directory hard work. No, you just did not tell it to search in the the directory pages. :) HTH Patrick --nextPart1728139.SApZIxsCCu Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iQEcBAABAgAGBQJKS3SfAAoJEPEn1chS2JDZt3wIAIul76z7ut8dn8b+JM5FxO/I wMHvOG1njFHR+QlwzP0DFKOChZmbm1Mst5eLKxzaXkAL6V41pGApNfnYB9qSdzQF pQ2Cy3410PkoHRfGhNoI6WzOcVW6B0YJ/Nm5JtJjFsS1XcwlgtzhK1QaVLzbkXOf UkSFnt2SF4Mu3M3q5FCCs373usCPUFck6XmH5/sA1o2yYF9FLYyNxYdb+lCbITn0 rPv0KV2617H/JwLnDCVjYjLiM6wBnuftppnESk5ueSFfO63Js90J+Ex7dqiI6MR/ PzVULRwzrHEJN7qNwj7+qT7BOXXrW8Rh7c+zIGCt9PaJBdNXPrDJD9K3Nvl3peM= =CWPL -----END PGP SIGNATURE----- --nextPart1728139.SApZIxsCCu--