How to execute .sh file on Windows?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to execute .sh file on Windows?
# 1  
Old 07-15-2014
How to execute .sh file on Windows?

How to execute .sh file on Windows?
# 2  
Old 07-15-2014
I'm forced to work in a Windows environment and have found Cygwin to be the best shell environment available.

You can then create a .bat file to execute the script file
Code:
@echo off
C:
chdir C:\cygwin\bin
set CYGWIN=nodosfilewarning

start /B /wait bash --login -i myscript.sh

Mike
This User Gave Thanks to Michael Stora For This Post:
# 3  
Old 07-16-2014
If you have an Ultimate or Enterprise edition of Windows, it comes with built-in support for running Unix applications called the Subsystem for UNIX-based Applications (SUA).

Whether your .sh script on Windows will run or not depends on what the shell script is trying to do.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

how to execute shell script present in unix machine remotely from windows

how to execute shell script present in unix machine remotely from windows? I having a shell script in my unix machine, need to execute the script remotely from my windows machine using Visual Basic or VBA macros. Thanks In Advance. --Suresh (1 Reply)
Discussion started by: sureshmani
1 Replies

2. Windows & DOS: Issues & Discussions

Windows remote to Solaris to execute ksh script

Hi all, I'm not sure if it is correct to post here. I am facing problem wanting to create a batch that run from my Windows XP pc to remote to multiple Solaris server to execute the server's ksh script. :wall: Can anyone give me a hints on how to do that? Thanks. (6 Replies)
Discussion started by: beginningDBA
6 Replies

3. Shell Programming and Scripting

MKS KORN SHELL WONT EXECUTE from windows command prompt

Can anybody help me with this small script , the script works fine and launches the IE from c:\documents and settings \test\my documents>ksh prompt $RunURL1.sh this scitpt works and launches the ie from ksh , but when i schedule it to run the script then i get the error box saying command:1... (2 Replies)
Discussion started by: venu
2 Replies

4. Shell Programming and Scripting

Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell... (8 Replies)
Discussion started by: niteesh_!7
8 Replies

5. HP-UX

how to execute script from my desktop windows xp to my HPUX server?

Good day, i would like to get some advice, how will i execute my script in hp ux servers, and how to configure rsh and rexec. thanks (2 Replies)
Discussion started by: kenshinhimura
2 Replies

6. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies

7. UNIX for Advanced & Expert Users

execute .ksh from windows

hi all... this is my question: i have two servers (sun and windows). In the Sun server i have solaris 5.7. The Windows Server is Win 2000. in the unix machine (sun) i have a program ksh, and i would like execute it from my windows server (run the ksh program what is in the unix machine from... (11 Replies)
Discussion started by: DebianJ
11 Replies

8. UNIX for Dummies Questions & Answers

Execute script on Unix/Linux from Windows

Hello ALL, Does anyone know how I can execute a script on Unix or Linux? Details: This execution needs to start from Windows and I need to pass some parameters to the script. If anyone knows how to execute, please, let me know. Please, send me an example how it is possible. Thanks. (4 Replies)
Discussion started by: brbillyh
4 Replies

9. UNIX for Dummies Questions & Answers

How to execute a shell script from Windows

I like to start a korn job remotely, from windows. I tried REXEC and that is not what I want. Need help !!!! thanks (4 Replies)
Discussion started by: kyawlin
4 Replies
Login or Register to Ask a Question