Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: Running Windows scripts & PATHEXT Date: Mon, 30 Aug 2004 16:29:37 -0700 Lines: 37 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: 12.9.207.207 User-Agent: Mozilla Thunderbird 0.7+ (Windows/20040827) In-Reply-To: X-IsSubscribed: yes Igor Pechtchanski wrote: > Ugh. I fully agree with CGF - the "hide the extension" business is > ugly, counterproductive, and should not be used. Well Cygwin's already doing it WRT things like .exe and .lnk... :-) > Having said that, is there any reason why > > $ ln -s myscript.pl myscript && chmod a+x myscript.pl > > doesn't do the trick? AFAIK, Windows doesn't attempt to execute files > with no extension, so it won't interfere with CMD, and will allow bash > to execute myscript.pl by typing "myscript"... Nah it'd work. Just that I'd have to create additional links for every myscript I come up with! That's what I was trying to avoid. > The situation with VB scripts is harder. I'd go for something like > > $ cat > myscript << EOF && chmod a+x myscript > #!/bin/bash > cscript /nologo myscript.vbs > EOF > > if you wanted to run "myscript.vbs" by just typing "myscript". FWIW, > if there were a way to get Visual Basic to ignore the shebang line at > the top, there's a way of specifying the right script interpreter, > too, so that you could run "myscript.vbs" directly, but I guess VB > will punt on that, so I won't go into details. Well one thing that I did was create a .cmd file that runs the .vbs with cscript instead of wscript but again, having to create and maintain an additional file (myscript.cmd calls myscript.vbs with cscript) *plus* have to make a symlink for myscript -> myscript.cmd (would that even work?!? - your example was a symlink -> a .pl file not a .cmd that calls a .vbs, etc....) is just getting way to messy... -- 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/