all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <brianjiang@gdnt.com.cn>
To: <eliz@gnu.org>, <help-gnu-emacs@gnu.org>
Subject: RE: grep-find question (Is it a bug of GunWin32 version of "grep")
Date: Sat, 11 Aug 2007 15:06:02 +0800	[thread overview]
Message-ID: <63F95800EDD046419F17688AAFD41CCF01C57102@rnd-ex01.rnd.gdnt.local> (raw)
In-Reply-To: <63F95800EDD046419F17688AAFD41CCF01C570FE@rnd-ex01.rnd.gdnt.local>

 Just reformat my previous mail....

-----Original Message-----
From: help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org [mailto:help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org] On Behalf Of brianjiang@gdnt.com.cn
Sent: 2007年8月11日 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: 
(Have you tried that?)
-------------------------------------------------------------------------------------------------------------------------------
D:\WiKi>
D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi 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

D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi 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

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 
./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=gdnt.com.cn@gnu.org [mailto:help-gnu-emacs-bounces+brianjiang=gdnt.com.cn@gnu.org] On Behalf Of Eli Zaretskii
Sent: 2007年8月10日 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: <brianjiang@gdnt.com.cn>
> 
> Then when I added the "-i" option, all the searching failed:
> ======================================-===
> D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi RS17
> 
> D:\WiKi>find . -type f -print0 | xargs -0 -e grep -nHi rs17
> 
> D:\WiKi>find . -type f -exec grep -nHi RS17 {} ";"
> 
> 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

  reply	other threads:[~2007-08-11  7:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 19:24 Emacspeak and UTF-8 -- possible? cmr.Pent
2007-08-07 10:41 ` Tim X
2007-08-08  9:09   ` cmr.Pent
2007-08-08 14:56   ` Stefan Monnier
2007-08-08 23:44     ` Robert D. Crawford
2007-08-09 17:44       ` Stefan Monnier
2007-08-10  7:40         ` Tim X
2007-08-10  5:39       ` Tim X
2007-08-10  9:23         ` grep-find question (Is it a bug of GunWin32 version of "grep") brianjiang
2007-08-10 14:07           ` Eli Zaretskii
2007-08-11  5:55             ` brianjiang
2007-08-11  7:06               ` brianjiang [this message]
2007-08-11 10:06               ` Eli Zaretskii
2007-08-12  9:58                 ` brianjiang
2007-08-12 18:59                   ` Eli Zaretskii
2007-08-10  5:27     ` Emacspeak and UTF-8 -- possible? Tim X
2007-08-11  4:02       ` Stefan Monnier
2007-08-13 21:47         ` Raman
2007-08-14 18:28           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63F95800EDD046419F17688AAFD41CCF01C57102@rnd-ex01.rnd.gdnt.local \
    --to=brianjiang@gdnt.com.cn \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.