This is the mail archive of the cygwin@cygwin.com 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


  I mentioned in my previous mail that adding the
CYGIN BIN DIRECTORY INTO path VARIABLE WORKS, BUT i
GOT ONE NEW PROBLEM.
  I WROTE A NT-BATCH FILE TO RUN THIS SHELL SCRIPT:
  TEST.BAT
  ********
  path c:\cygwin\bin;%path%
  bash c:\cygwin\home\admin\abcd > c:\ss.txt

  I RAN IT FROM THE COMMAND LINE AS:
     C:\>TEST.BAT

** IT WORKED.**

  THEN I SCEDULED THIS BATCH TO RUN AUTOMATICALLY, AS
FOLLOWS:
  at 15:45 c:\test.bat

  IT STARTED EXECUTING THE SCRIPT, BUT NOTHING
HAPPENED! WHEN I TRY TO DELETE ss.txt, an error box
pops up  :
   "Cannot delete. There has been a sharing Violation.
The source or destination may be in use"

   When I see the contents of ss.txt, it has :
      -----------------------------------------
   The authenticity of host 'wehjasa (51.53.202.115)'
can't be established. RSA1 key fingerprint is
5a:71:6a:2a:ae:ed:97:52:70:56:be:83:77:d2:c0:ee.
Are you sure you want to continue connecting (yes/no)?

      -----------------------------------------
   I understand that it is unable to make a secure
connection to the remote host.

  Can somebody explain why it works from the command
line & not when run through a SCHEDULER, & a possible
solution..

  Thanks a lot..
  SS


 
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 !
   ---------------------

 Make sure sh or bash is in your path or otherwise
 specify the full path to
 sh or bash.  This *will* work so long as sh or bash
 can be found.
 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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


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