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]

Case resolution when searching $PATH


Couldn't find a definitive word on this in the archives so...

I need to figure out how to make the shell (I use tcsh) impartial to
case when it searches the $PATH variable for an executable.  I am
using build scripts which I have no control over which reference MS
exe's which happen to have all upper case filenames.  Unfortunately
for me, the scripts use all lower case when calling the executables.
 This means that the exe's are not found in my path.

If 'which' behaves like the shell when the shell searches for an
exec, then I am confused as to its behavior.  Look at this example:

If I have a file /path/file.exe and /path is in $PATH and I type
'which file.exe' I usually get the correct output.  If instead I
type 'which FILE.EXE' it can't find it.  But if I give which the
path to the file like so: 'which /path/FILE.EXE' it can resolve it. 
Why the inconsistency?

Another thing, notice above I said I usually get the correct output.
 I have xemacs in my path and it is found if I type 'which xemacs'
but NOT 'which xemacs.exe' EVEN THOUGH that is the actual filename
(case and all) and it is marked executable.  As usual, if I give
which the full path to xemacs.exe it will recognize that name.  What
good is a path search if you have to know the path before you
search???

I have looked through the man page for tcsh and can't find any
mention of a way to ignore case when searching the path.  I assume
this is done internal to the shell and I could not circumvent it
with a script (to lowercase the filename beforehand).

Is there a way I can still get these build script calls resolved
even though the case doesn't match?

I know there are a few questions here but it boils down to:
-why is the case sensitivity inconsistent? and
-how can I change it to work the way I want?


Thanks,
Brett

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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