delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/10/10:47:49

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-Id: <5.1.0.14.0.20020610104050.04c86c98@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
Date: Mon, 10 Jun 2002 10:43:55 -0400
To: "Steven Weiss" <sweiss AT iafrica DOT com>, <cygwin AT cygwin DOT com>
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: running shell scripts
In-Reply-To: <076e01c21059$1cfd6ee0$0200a8c0@weiss>
Mime-Version: 1.0

At 04:30 AM 6/10/2002, Steven Weiss wrote:
>Hi
>
>/Develop/test/bin> chmod 755 work
>/Develop/test/bin> ls -l work
>-rwxr-xr-x    1 dbadmin Administ       27 Jun  9 20:18 work
>/Develop/test/bin> ./work
>bash: ./work: No such file or directory
>
>I am trying to running a shell script from an interactive bash session. I
>get the following error when running the shell script. It seems to work when
>I put the #! /cygwin/bin/bash inside the script. Surely the script should
>run with the execute permissions set as they are.


bash is *not* the default shell in Cygwin.  /bin/sh is which is ash.  Did
you install it and make sure that it's in your path?

BTW, there's nothing wrong with providing the command interpreter as the 
first line of the script.  Actually, it's highly recommended practice.


Larry Hall                              lhall AT rfk DOT 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/

- Raw text -


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