Solved

Converting Unix Shell scripts to Windows/Dos Batch files

Posted on 2007-03-22
7
2,205 Views
Last Modified: 2013-12-26
I am inquiring to see if there is a software product or a general way to convert Unix shell scripts to dos batch files. It does not matter if they are done on the fly or manually. All that matters is that the Unix Shell scripts which are running on Unix should be converted to the Dos batch file and give the same results. I have tried to find this on google numerous times but to no avail. If anyone could tell me of a guide or a software I would really appreciate it.

Thank you
0
Comment
Question by:tgatif
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 58

Expert Comment

by:amit_g
ID: 18775646
http://www.mkssoftware.com/

can be used to run most of those scripts as is in DOS.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 18776198
There is no such tools you can convert a Unix shell script to a DOS patch file.

The best tool is your brain + text editor,  to convert the Unix command to dos systax. You'll find some of the commands  are unconvertable since they are different OS.
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 18781466
>> All that matters is that the Unix Shell scripts which are running on Unix should
>> be converted to the Dos batch file and give the same results.

Why not running a UNIX shell on Windows instead of converting the scripts? The options are Cygwin and SfU:

http://www.cygwin.com

http://www.microsoft.com/technet/interopmigration/unix/sfu/default.mspx
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Expert Comment

by:mglxxx
ID: 18791292
I'd definitely go with jkr's recommendation. Another way would be to convert everything to perl, because perl is
also available on MS platforms. The conversion would be a one-time manual task. After that, all scripts which apply
both to MS and to Unix should be written in Perl.
0
 
LVL 24

Expert Comment

by:fridom
ID: 18807194
Well I'd go for jkr soluton also. Howrver mglxxx has good arguments also, why he just mentions Perl for that is his secret I guess ;-)

Just let's see what other candidates are around:
Python: www.python.org
Ruby: www.ruby-lang.org
Tcl/Tk:
Schemes
Common Lisps
Smalltalks
Erlang
Haskell
Ocaml
ML
Icon
Rexx
awk
IO
and tons of others.

Scripting language are not just good on Unices ;-)

Regards
Friedrich
0
 
LVL 9

Expert Comment

by:mglxxx
ID: 18809879
Friedrich, of course there are tons of scripting languages available for Windows. However, since we are talking about shell scripts, I assumed that tgatif has a Unix background. Thus  I thought that it would be quite likely that he also knows Perl, which would make
porting the stuff to Windows rather painless.
0
 
LVL 24

Expert Comment

by:fridom
ID: 18813919
Quit an assumption. I'm using Unix all-day but I do not use any Perl, so am I know a Unix user ;-)

Regards
Friedrich
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question