Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Converting Unix Shell scripts to Windows/Dos Batch files

Posted on 2007-03-22
7
Medium Priority
?
2,222 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 2000 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

670 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