delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/28/16:17:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: Mark Molloy <MarkMolloy AT DirecWay DOT COM>
Subject: $PATHEXT not sufficient to run script from BASH without specifying extension on Windows XP?
Date: Thu, 28 Apr 2005 19:42:12 +0000 (UTC)
Lines: 38
Message-ID: <loom.20050428T213602-892@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
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?
#



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019