Converting batch files to shell scripts

Hi,

Is there any way of converting DOS batch files to shell scripts without writing them from scratch?  Is there any conversion tool out there?  Is there any emaulator that will run Batch files on Linux.  I had a quick look at wine but it did not seem that it would work.

Thanks
Gareth
garethcummingsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
NopiusConnect With a Mentor Commented:
garethcummings, as pjedmond said, DOSEMU is the best solution for you.

You only need to map unix path to local drive in dosemu session, then to run batch files:

for example to map /tmp path to E: drive in 'dosemu' session, execute:

unix# dosemu
...
C:\>lredir E: LINUX\FS\tmp\


then run your batch file. Please note, there is a 8+3 naming conversion in DOS, so all unix filenames will look like lowercase 8+3 files.
0
 
ahoffmannCommented:
> Is there any conversion tool out there?
I guess no.

> Is there any emaulator that will run Batch files on Linux.  
yes, for example wine

> Is there any way of converting DOS batch files to shell scripts without writing them from scratch?
hmm, writing from scratch would probably the fastest and safest way, will be more readable too ;-)
0
 
garethcummingsAuthor Commented:
Thanks for you anwsers, I had a look at Wine already but I don't think it will enable us to run the batch files without causing errors.  Anybody else ever come accross this before?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
ahoffmannCommented:
> Anybody else ever come accross this before?
I guess no, 'cause nobody realy writes script when there is a sophisticated GUI where you can plague and p(r)ay ;-)
hence there're no script which need to be converted (other than a simple shell oneliner, probably ...)
*SCNR*
0
 
pjedmondConnect With a Mentor Commented:
YOu may wish to have a look through these links:

http://www.tldp.org/LDP/abs/html/dosbatch.html

There is a DOS emulator for for linux which may help:

http://www.dosemu.org/

(   (()
(`-' _\
 ''  ''
0
 
ahoffmannCommented:
good suggestion, forgot about ancient dosemu
0
 
garethcummingsAuthor Commented:
Thanks guys thats exactly what I was looking for, I spilt the points between pjedmond and Nopius.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.