Batch to Bash/Shell Script Converter

16,257

Solution 1

There is no possible way to do this. Why? Because not only are both the source and destination languages Turing complete, both are hideous piles of accumulated hacks from decades upon decades of maintenance programmers. And not only that, let's say you map all the syntax from Windows Batch to Bash (careful: version 3.2 only, Mac doesn't have newer!). Then what will you do when the original script invokes an external program? Will you know to map Windows Movie Maker to iMovie? Microsoft Office to iWork? Internet Explorer to Safari?

What about the fact that the two different systems have different rules about what constitutes a valid filename? If the source script mentions C:\Windows, what does that mean on a Mac?

There is a never ending amount of work required to do what you're asking. Perhaps you can narrow the scope (a lot).

Solution 2

This website here claims to have a way to manually do it. But, i do not have any Mac OS X computers to test if its true. Wish i could be more help.

Share:
16,257

Related videos on Youtube

ShadowDust99
Author by

ShadowDust99

Updated on June 04, 2022

Comments

  • ShadowDust99
    ShadowDust99 almost 2 years

    I have recently purchased a Mac and have found out that it does not have any support for Batch (.bat) files at all. All I want is a website that will convert a Batch file program, to a Bash file program so I don't have to learn a whole new programming language, since I am so used to the Batch programming. Is there an online converter or possibly an app/program that could be found on a website or on the Mac App Store. If so, could you please tell me the name of the program, where I can find it, and a link to it. Thanks!

  • Michał Leon
    Michał Leon almost 3 years
    of course it's possible. What's more, they are actually quite similar, but most people don't seem to know it.