Operating System - Linux
1751976 Members
4611 Online
108784 Solutions
New Discussion юеВ

Re: script conversion tool or utility

 
SOLVED
Go to solution
Shivkumar
Super Advisor

script conversion tool or utility

Hi,

We are searching for a converter to convert unix shell script into MS Windows2003 *.bat batch file.

Appreciate if someone can suggest any tool or utility for these conversion ?

Thanks,
Shiv
4 REPLIES 4
Bill Hassell
Honored Contributor
Solution

Re: script conversion tool or utility

This is a lot more complicated than converting a few shell commands. Most scripts (just like Windows/DOS bat files) have a lot of commands that are unique to the OS. For instance, there is nothing that can map networking commands like lanadmin or ifconfig, nor is there any meaning to translate LVM or VxVM commands into Windows/DOS commands. You might try loading BASH or ksh onto your windows machine but I suspect there will be a lot of "program not found" messages from your scripts running on Windows.


Bill Hassell, sysadmin
Jannik
Honored Contributor

Re: script conversion tool or utility

You could use perl script instead of shells and bat programs.
But you have to be very carefull about OS specific commands as Bill mentioned.
jaton

Re: script conversion tool or utility

Shiv,

MS have some advice on doing this here:

http://www.microsoft.com/technet/interopmigration/unix/sfu/pshscrpt.mspx

HTH

Duncan

I am an HPE Employee
Accept or Kudo
spex
Honored Contributor

Re: script conversion tool or utility

Hi Shiv,

Why not install the shell the scripts are written for on Windows? You will still have to modify the scripts, but it would be less work than converting them to batch files.

http://www.cygwin.com/mirrors.html
http://www.research.att.com/sw/tools/uwin/
http://www.steve.org.uk/Software/bash/

PCS