From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: RE: grep-find question (Is it a bug of GunWin32 version of "grep") Date: Sat, 11 Aug 2007 15:06:02 +0800 Message-ID: <63F95800EDD046419F17688AAFD41CCF01C57102@rnd-ex01.rnd.gdnt.local> References: <63F95800EDD046419F17688AAFD41CCF01C570FE@rnd-ex01.rnd.gdnt.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1186816152 2108 80.91.229.12 (11 Aug 2007 07:09:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2007 07:09:12 +0000 (UTC) To: , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 11 09:09:09 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IJl5w-0008NN-Dm for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Aug 2007 09:09:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJl5v-0004vl-MC for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Aug 2007 03:09:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IJl5g-0004uv-UK for help-gnu-emacs@gnu.org; Sat, 11 Aug 2007 03:08:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IJl5f-0004tw-TV for help-gnu-emacs@gnu.org; Sat, 11 Aug 2007 03:08:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJl5f-0004tk-Q6 for help-gnu-emacs@gnu.org; Sat, 11 Aug 2007 03:08:51 -0400 Original-Received: from email.gdnt.com.cn ([202.104.30.38]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IJl5d-0008N3-6H; Sat, 11 Aug 2007 03:08:50 -0400 Original-Received: from sd-ef-01.cnshn.gdnt.local ([202.38.41.132]) by email.gdnt.com.cn with Microsoft SMTPSVC(6.0.3790.1830); Sat, 11 Aug 2007 15:10:03 +0800 Original-Received: from sd-ex-01.cnshn.gdnt.local ([202.38.38.8]) by sd-ef-01.cnshn.gdnt.local with Microsoft SMTPSVC(6.0.3790.1830); Sat, 11 Aug 2007 02:09:56 -0500 Original-Received: from rnd-ex01.rnd.gdnt.local ([202.38.32.250]) by sd-ex-01.cnshn.gdnt.local with Microsoft SMTPSVC(6.0.3790.1830); Sat, 11 Aug 2007 15:09:55 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: <63F95800EDD046419F17688AAFD41CCF01C570FE@rnd-ex01.rnd.gdnt.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: grep-find question (Is it a bug of GunWin32 version of "grep") Thread-Index: AcfbWDIY+YPetBxtS0C91gAYqEecFAAgcaGAAAL42JA= X-OriginalArrivalTime: 11 Aug 2007 07:09:55.0170 (UTC) FILETIME=[9E831420:01C7DBE6] X-TM-AS-Product-Ver: SMEX-7.0.0.1345-3.6.1039-15232.002 X-TM-AS-Result: No--14.422200-8.000000-31 X-Detected-Kernel: Windows 2000 SP4, XP SP1+ X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46496 Archived-At: Just reformat my previous mail.... -----Original Message----- From: help-gnu-emacs-bounces+brianjiang=3Dgdnt.com.cn@gnu.org = [mailto:help-gnu-emacs-bounces+brianjiang=3Dgdnt.com.cn@gnu.org] On = Behalf Of brianjiang@gdnt.com.cn Sent: 2007=C4=EA8=D4=C211=C8=D5 13:55 To: eliz@gnu.org; help-gnu-emacs@gnu.org Subject: RE: grep-find question (Is it a bug of GunWin32 version of = "grep") I use the GnuWin32 of Grep 2.5.1 too (install using = grep-2.5.1a-2-setup.exe) -------------------------------------------------------------------------= ----------------------------------------------------------- D:\WiKi>grep -V grep (GNU grep) 2.5.1 Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is = NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR = PURPOSE. And I cannot find the pcre.dll in my computer. Instead, I find pcre3.dll = (installed by GnuWin32): -------------------------------------------------------------------------= -------------------------- D:\WiKi>which pcre3.dll C:/Program Files/GnuWin32/bin/pcre3.dll The command path has no problem: ---------------------------------------------------------- D:\WiKi>which grep C:/Program Files/GnuWin32/bin/grep.EXE D:\WiKi>which find C:/Program Files/GnuWin32/bin/find.EXE D:\WiKi>which xargs C:/Program Files/GnuWin32/bin/xargs.EXE And I found if when text in the file is lowcase, e.g., "rs17", then I = can use "-i" option to find it successfully. e.g., "-i RS17". But if the text in the file is uppercase, e.g., "RS17", then neither "-i = rs17" nor "-i RS17" can found it :( See below:=20 (Have you tried that?) -------------------------------------------------------------------------= ------------------------------------------------------ D:\WiKi> D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi rs17=20 ./MyBase.muse:284:$ find . -type f -exec grep -nHi rs17 {} NUL ";" ./MyBase.muse:285:$ find . -type f -print0 | xargs -0 -e grep -nHi rs17 D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi RS17=20 ./MyBase.muse:284:$ find . -type f -exec grep -nHi rs17 {} NUL ";" ./MyBase.muse:285:$ find . -type f -print0 | xargs -0 -e grep -nHi rs17 D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nH RS17 ./MyBase.muse:116: - RS17: D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nH rs17=20 ./MyBase.muse:284:$ find . -type f -exec grep -nHi rs17 {} NUL ";" ./MyBase.muse:285:$ find . -type f -print0 | xargs -0 -e grep -nHi rs17 Yes, when I say "mingw" version, I means MSYS version. I always mess up = these two term :( The MSYS version of grep is 2.4.2: ------------------------------------------------------------------------ $ grep -V grep (GNU grep) 2.4.2 Copyright 1988, 1992-1999, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is = NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR = PURPOSE. And it can find the thing correctly (3 matches): ------------------------------------------------ Brian@BRIANJIANG /D/WiKi $ find . -type f -print0 | xargs -0 -e grep -nHi rs17 ./MyBase.muse:116: - RS17: ./MyBase.muse:284:$ find . -type f -exec grep -nHi rs17 {} NUL ";" ./MyBase.muse:285:$ find . -type f -print0 | xargs -0 -e grep -nHi rs17 Brian@BRIANJIANG /D/WiKi $ find . -type f -print0 | xargs -0 -e grep -nHi RS17 ./MyBase.muse:116: - RS17: ./MyBase.muse:284:$ find . -type f -exec grep -nHi rs17 {} NUL ";" ./MyBase.muse:285:$ find . -type f -print0 | xargs -0 -e grep -nHi rs17 I currently use the MSYS version for my Emacs and it works well. Regards, Brian -----Original Message----- From: help-gnu-emacs-bounces+brianjiang=3Dgdnt.com.cn@gnu.org = [mailto:help-gnu-emacs-bounces+brianjiang=3Dgdnt.com.cn@gnu.org] On = Behalf Of Eli Zaretskii Sent: 2007=C4=EA8=D4=C210=C8=D5 22:07 To: help-gnu-emacs@gnu.org Subject: Re: grep-find question (Is it a bug of GunWin32 version of = "grep") > Date: Fri, 10 Aug 2007 17:23:32 +0800 > From: >=20 > Then when I added the "-i" option, all the searching failed: > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D-=3D=3D=3D > D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi RS17 >=20 > D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi rs17 >=20 > D:\WiKi>find . -type f -exec grep -nHi RS17 {} ";" >=20 > D:\WiKi>find . -type f -exec grep -nHi rs17 {} ";" I cannot reproduce this with the GnuWin32 port of Grep 2.5.1 (from = grep-2.5.1a-bin.zip on the GnuWin32 site). What version do you have on = your machine? If you have the same version as I do, maybe you have some problem with = pcre.dll, the regexp library on which Grep depends (like if some other = package you installed overwrote the version of pcre.dll that came with = Grep 2.5.1)? > And I try the "mingw" version of these tools, the "-i" version works > well: What is the "mingw" version? where did you get the binaries? Do you = mean the MSYS version, perhaps? _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs