Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Organization: -ENOENT X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Cygwin-L 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "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