delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/23/18:09:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: johnwrussell AT comcast DOT net
To: cygwin AT cygwin DOT com
Subject: Re: 1.5.12: find with -iregex is case-sensitive
Date: Sun, 23 Jan 2005 23:09:28 +0000
Message-Id: <012320052309.13449.41F42EA80008A69000003489220588617204040A9C9C9A9D9902080106@comcast.net>
X-Authenticated-Sender: am9obndydXNzZWxsQGNvbWNhc3QubmV0

I found a workaround:  Remake findutils 4.1.7-4 from source, and use /usr/local/bin/find.exe instead of /usr/bin/find.exe. 

Here's what I did:

$ cd /usr/src/findutils-4.1.7-4
$ ./configure
$ make
$ make install
$ mv /usr/bin/find.exe /usr/bin/find.exe.old
$ cd /bin
$ ln -s /usr/local/bin/find.exe

Now the test procedure gives correct case-insensitive results:

$ find test -iregex ".*file.*"
test/file-a
test/File-b


> Even with the -iregex option, the find command performs case-sensitive
> matching. 
> 
> Test procedure:
> 
> $ mkdir test
> $ touch test/file-a
> $ touch test/File-b
> $ find test | grep -i ".*file.*"
> test/file-a
> test/File-b
> 
> $ find test -iregex ".*file.*"
> test/file-a
> 
> $ find test -iregex ".*File.*"
> test/File-b
> 
> I'm using Cygwin 1.5.12-1 under Windows XP Professional Ver 5.1 Build 2600
> Service Pack 1, findutils 20041227-1.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019