1.5.12: find with -iregex is case-sensitive
johnwrussell@comcast.net
johnwrussell@comcast.net
Mon Jan 24 00:30:00 GMT 2005
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/
More information about the Cygwin
mailing list