Shell scripts on Windows

Asked by martino

I need to run a shell script (wrote in Ubuntu 8.04) in some PC with Windows XP.
It is not a complex script, it uses: cat echo grep mv read sed sleep while and pipe.
The people working on Windows XP are not familiar with computer interfaces; they need
to "press a button" or digit a simple command, and get the result of the script.
So, should be better avoid cygwin, or similar solution, if possible.
There is a solution to this problem ?
Thank You in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Steve
Solved:
Last query:
Last reply:
Revision history for this message
Robert Di Gioia (digioiar) said :
#1

If you don't want to use cygwin, then your best option is to rewrite the script using Windows commands (ie type instead of cat, rename or copy/delete instead of mv). You will need to download tools like grep and sed that Windows doesn't support natively, google will show you lots of them.

Revision history for this message
Bruce (bmsh-mckenzie) said :
#2

Do you want the script to run on the Linux box, or on the Windows systems?

If on the Linux box, create a web page to create an interface and to launch the script.

If on the Windows systems (will work for Windows 2000 and later) look at vbscript or jscript, and Windows Management Interface (WMI). If you need an interface beyond an icon or button to press and what input the script can ask from the user, use a web interface, Visual Basic (easy way to create dialogs), or jump into C++, C#, or Java.

For vbscript and jscript, take a look at http://msdn.microsoft.com/en-us/library/d1et7k7c(VS.85).aspx

For Windows Management Instrumentation look at http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx

To look for example scripts and articles search both http://msdn.microsoft.com/ and http://technet.microsoft.com/
In IE you can add both of these to the list of search engines IE will use from its search box.

Revision history for this message
Best Steve (stupendoussteve-deactivatedaccount) said :
#3

Check out http://sourceforge.net/projects/unxutils - It is native Windows
ports of Linux/Unix utilities (does not need cygwin or any cygwin
libraries).

This could help with running them, at least.

Revision history for this message
martino (lrinetti-libero) said :
#4

Thanks Steven Susbauer, that solved my question.