delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/25/12:56:44

X-Spam-Check-By: sourceware.org
Date: Wed, 25 Apr 2007 12:56:22 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Dave Korn <dave DOT korn AT artimi DOT com>
cc: cygwin AT cygwin DOT com
Subject: RE: how to run shell script
In-Reply-To: <000401c78592$ba8caf50$2e08a8c0@CAM.ARTIMI.COM>
Message-ID: <Pine.GSO.4.63.0704251254210.7209@access1.cims.nyu.edu>
References: <10136740 DOT post AT talk DOT nabble DOT com> <000401c78592$ba8caf50$2e08a8c0 AT CAM DOT ARTIMI DOT COM>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Mon, 23 Apr 2007, Dave Korn wrote:

> On 23 April 2007 10:42, sg wrote:
>
> > hi friends,,
> >
> > how to run shell script on cygwin in windows..
>
>   chmod a+x ./script-name
>   ./script-name
>
> i.e. it has to have the executable bit set, and you need to specify the
> current directory as part of the path if you haven't got the current
> directory in your $PATH (which you probably don't, and probably
> shouldn't).

...Unless the trailing "on windows" really means "from a windows command
prompt", in which case the proper way to do this is "c:/cygwin/bin/bash -l
-c ./script-name" (or pick your favorite shell with the appropriate
options).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

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