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: run batch w/o .bat?


At 04:32 PM 6/3/2002, David T-G wrote:

<snip>


>Same here; it's just nice to not have to remember to tack on the .bat if
>possible.
>


Right.  This has been discussed.  It could be added but it opens up a can of
worms and would likely result in performance issues as well.  Searching for
foo.exe and foo.bat (and foo.com and foo.sh and ...) whenever someone types
"foo" is not ideal.


>% particular to get this to happen.  It's just always worked for me, so long as 
>% Cygwin thought the batch file was executable (i.e. chmod +x <name>.bat).  
>
>That's something I also never had to do, but I understand that mount
>means I might (or, conversely, could consider a file *not* executable,
>which was impossible under B20, where I was last and where I still find
>myself thinking at times).


If by this you mean "mount -x" or "mount -X", then "yes".


>% But, of course, creating #!.exe and adding it as the first line to the batch 
>% file is exactly what tells Cygwin that this file should be treated as an 
>% executable.  So #!.exe is just another option if you can't get what you 
>% want/need from chmod (like on 9x/Me systems).
>
>Since I'm on 98, that may be exactly what I need.


OK, then this could be good news for you! ;-)


>% 
>...
>% >*definitely* news to me (and some of the followups intimated that it
>% >might be problematic), I wonder myself if there is a simple way to tell
>...
>% 
>% I'm not sure what posts you're referring to when you suggest that #!.exe
>% is problematic.  I went back and reviewed the thread there and saw no
>% outstanding concerns about #!.exe.  Perhaps you could qualify that statement
>% better.
>
>I suppose I misread Jan's post farther down in the thread, where he says
>that running "foo" still doesn't work.  Unfortunately, the thread peters
>out there.


I think Jan was referring to the desire to type "foo" and have Cygwin 
translate that to "foo.bat" automagically.  That doesn't work now and 
may never, for the reasons I noted above.


>% 
>% Obviously, you're welcome to pursue any .bat file issue you have further but 
>% I see nothing wrong with the observations and solutions posted so far.  They
>% address the stated concern of being able to run a batch file from Cygwin 
>% shells AFAICS.
>
>Yeah, I can keep tacking .bat on the end at the prompt and in the meantime
>keep scratching my head waiting to put the pieces back together again :-)


Sounds like fun. ;-)


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
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]