This is the mail archive of the
mailing list for the Cygwin project.
Re: Running Unix Shell script from NT
- To: Cygwin-L <cygwin at cygwin dot com>
- Subject: Re: Running Unix Shell script from NT
- From: Warren Young <warren at etr-usa dot com>
- Date: Thu, 12 Apr 2001 16:43:15 -0600
- Organization: -ENOENT
- References: <email@example.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