Message-Id: <200504290130.j3T1UVAB023481@delorie.com> 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 From: "Gary R. Van Sickle" To: Subject: RE: $PATHEXT not sufficient to run script from BASH without specifying extension on Windows XP? Date: Thu, 28 Apr 2005 20:31:57 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: X-IsSubscribed: yes > # > # I can't seem to execute "testScript.sh" without # > specifying its extension: > # > $ testScript > bash: testScript: command not found > > # > # Although the file is there and executable: > # > $ ls -lt testScript.* > -rwxr-xr-x 1 Owner None 43 Apr 28 11:10 testScript.sh > > # > # ...and it runs when the extension *is* specified, # thus > showing that it's on the $PATH: > # > $ testScript.sh > hello yourself from ./testScript.sh > > # > # And ".sh" is in the $PATHEXT variable: > # > $ echo $PATHEXT > .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.SH;.KSH > > # > # and "#! /bin/bash" is on the first line of the script: > # > $ cat testScript.sh > #! /bin/bash > echo "hello yourself from " $0 > > # > # What am I missing to be able to run a script from bash # > without specifying the extension? > # > > PATHEXT is a Windows NT/etc deal. Bash doesn't use it, and AFAICT Bash won't do what you're looking for. I don't quite get the issue here though; if you're doing this interactive, just TAB-complete, and if you're doing it from a script, just specify the full name. -- Gary R. Van Sickle -- 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/