[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: grep-find question (Is it a bug of GunWin32 version of "grep")
From: |
brianjiang |
Subject: |
RE: grep-find question (Is it a bug of GunWin32 version of "grep") |
Date: |
Sat, 11 Aug 2007 13:55:17 +0800 |
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
- Emacspeak and UTF-8 -- possible?, address@hidden, 2007/08/03
- Re: Emacspeak and UTF-8 -- possible?, Tim X, 2007/08/07
- Re: Emacspeak and UTF-8 -- possible?, address@hidden, 2007/08/08
- Re: Emacspeak and UTF-8 -- possible?, Stefan Monnier, 2007/08/08
- Re: Emacspeak and UTF-8 -- possible?, Tim X, 2007/08/10
- grep-find question (Is it a bug of GunWin32 version of "grep"), brianjiang, 2007/08/10
- Re: grep-find question (Is it a bug of GunWin32 version of "grep"), Eli Zaretskii, 2007/08/10
- RE: grep-find question (Is it a bug of GunWin32 version of "grep"),
brianjiang <=
- RE: grep-find question (Is it a bug of GunWin32 version of "grep"), brianjiang, 2007/08/11
- Re: grep-find question (Is it a bug of GunWin32 version of "grep"), Eli Zaretskii, 2007/08/11
- RE: grep-find question (Is it a bug of GunWin32 version of "grep"), brianjiang, 2007/08/12
- Re: grep-find question (Is it a bug of GunWin32 version of "grep"), Eli Zaretskii, 2007/08/12
- Re: Emacspeak and UTF-8 -- possible?, Tim X, 2007/08/10
- Re: Emacspeak and UTF-8 -- possible?, Stefan Monnier, 2007/08/11
- Re: Emacspeak and UTF-8 -- possible?, Raman, 2007/08/14
- Re: Emacspeak and UTF-8 -- possible?, Stefan Monnier, 2007/08/14