delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/12/18:43:58

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3AD62F83.E64F4C70@etr-usa.com>
Date: Thu, 12 Apr 2001 16:43:15 -0600
From: Warren Young <warren AT etr-usa DOT com>
Organization: -ENOENT
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: Running Unix Shell script from NT
References: <4 DOT 3 DOT 1 DOT 2 DOT 20010411140918 DOT 020056d0 AT pop DOT ma DOT ultranet DOT com>

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> >If I open cmd & "cd c:\cygwin\home\admin" & try to run
> >"abcd" there, it does not recognize the script.
> >How can I achieve this?
> 
> Replace "abcd" with "sh abcd" or "bash abcd".

Alternatively, rename the script to abcd.sh, then run the script again. 
You'll get the familiar "choose a program to run this file" dialog. 
Tell it to use c:\cygwin\bin\bash.exe.  It will then run the script the
first time in another window, but on subsequent runs it will run within
the calling window, just like a Windows batch file.

Yet another solution is to download the 4DOS/NT command shell from
www.jpsoft.com, then set the ".sh" environment variable to
c:\cygwin\bin\bash.exe.  This lets you call the script without the
extension: "abcd" instead of "abcd.sh".  Since I run 4DOS/NT all the
time, I use Bourne shell scripts any time I need something more powerful
than a batch file.
--                                                   _
= 'Net Address: http://www.cyberport.com/~tangent | / \  ASCII Ribbon
= ICBM Address: 36.82740N, 108.02040W, alt. 1714m | \ /  Campaign
=                                                 |  X   Against
= Chance favors the prepared mind.                | / \  HTML Mail

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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