This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windows file names & case insensitive search


Le,

Although you don't say it, I assume you're using one or both of the "--include" "--exclude" options to grep/egrep.


The "check_case:level" CYGWIN environment variable option might be relevant and the options it provides might be helpful to you. Check it out in the "using-cygwinenv.html" page of the Cygwin User Guide, from which I excerpt here:

* check_case:level - Controls the behaviour of Cygwin when a user tries to open or create a file using a case different from the case of the path as asved on the disk. level is one of relaxed, adjust and strict.

- "relaxed" which is the default behavior simply ignores case. That's the default for native Windows applications as well.

- "adjust" behaves mostly invisible. The POSIX input path is internally adjusted in case, so that the resulting DOS path uses the correct case throughout. You can see the result when changing the directory using a wrong case and calling /bin/pwd afterwards.

- "strict" results in a error message if the case isn't correct. Trying to open a file Foo while a file fOo exists results in a "no such file or directory" error. Trying to create a file BAR while a file Bar exists results in a "Filename exists with different case" error.


Randall Schulz
Mountain View


At 13:29 2002-07-11, Le Snelson wrote:
Grep is case sensitive with respect to Windows 2000 file names. This causes a problem across various directories, e.g., -r.

I found a discussion back in '97 on this topic - no visible action resulted. Has there been no decision to TOUPPER() filenames in the Windows implementation, or has another work around been implemented that I'm not seeing?

Le Snelson

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]