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

 Hello there.

"bash prog" should work if you are in the right directory (is "bash" in your
You could also :
* rename your scripts by adding extensions based on the shell you want (ie.
".bash" and ".sh")
* then "assoc .bash=bashfile" and "ftype bashfile=bash %1 %*" (NT shell)
* same for ".sh" : "assoc .sh=shfile" and "ftype shfile=sh %1 %*"
Then you just have to type "abcd.bash".
If really you don't want to type ".bash", then just add ".bash" and ".sh" to
PATHEXT system wide variable

By the way, the notation 'cmd & cd "a path"' is a bit wrong...

Hope it works !

----- Original Message -----
From: "SS" <>
To: "Larry Hall (RFK Partners, Inc)" <lhall>; <cygwin>
Sent: Wednesday, April 11, 2001 6:16 PM
Subject: Re: Running Unix Shell script from NT

> I have Cygwin on Win-NT.
> I have some unix shell scripts written in CYGWIN
> environment. How do I run the shell script directly
> from the NT command line(dos prompt), without
> opening cygwin?
> e.g., Script name = abcd
>        Directory under Cygwin   : /home/admin
>        Directory wrt NT         : c:\cygwin\home\admin
> 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".
>  -------------------------
>   NOPE, DOES NOT WORK !! Tried sh abcd, bash abcd,
> ../abcd, nothing works !
>   ---------------------
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> --
> Want to unsubscribe from this list?
> Check out:

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]