run batch w/o .bat?

David T-G davidtg-cygwin@justpickone.org
Mon Jun 3 13:32:00 GMT 2002


Larry, et al --

...and then Larry Hall (RFK Partners, Inc) said...
% 
% At 03:09 PM 6/3/2002, David T-G wrote:
% >
% >...and then Larry Hall (RFK Partners, Inc) said...
% >% 
...
% >% The email archives is the place to look and look hard for something like 
% >
% >I did, too, but I didn't find anything that looked familiar -- and yet I
% >could swear that I had just seen this go by before.
% 
% Well, like I said, I didn't do anything more than ask for messages with 
% "batch" in them.  Earnie's response was the fourth one based on score.

Yeah; I went farther than that.


% I definitely wasn't looking with something particular in mind.  I just 
% reviewed what was returned in the order it was returned.

Understood.


% 
% >My recollection is that there's a parameter in the cygwin world where you
% >can add .bat to the extensions list that the shell should automatically
% >append to an unqualified name so that it knows to run .bat files just
% >like .exe and .com files.  I haven't found that setting, though.  While
% >it certainly may not exist, I can hardly believe that I dreamed it or
% >that I so badly misremembered something else...
% 
% 
% I can't clarify your memory for you either.  I can say that I don't know 

You can't?!?  Darn; I keep looking for someone who can help me with
that ;-)


% of such a facility.  The closest I know of is an analogous one in DOS which
% uses PATHEXT.  That said, I've never had a problem with typing the full name 

Hmmm...  That sounds familiar; maybe I have the two reversed.  Time for
more searching...


% to the batch file (i.e. <name>.bat) at the bash (or ash for that matter) 
% prompt and getting the batch file to run properly.  I haven't set anything in 

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


% 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).


% 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.


% 
...
% >*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.


% 
% 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 :-)


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


Thanks & HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020603/89ff9ae1/attachment.sig>


More information about the Cygwin mailing list