This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Running Unix Shell script from NT

"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, 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, then set the ".sh" environment variable to
c:\cygwin\bin\bash.exe.  This lets you call the script without the
extension: "abcd" instead of "".  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: | / \  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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]