Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DOS Batch to Unix shell script conversion

2,090 views
Skip to first unread message

Mithun Goswami

unread,
Apr 15, 2013, 2:40:18 AM4/15/13
to
Hi All,

We are planning to migrate our system from windows to linux.

We use Informatica and DOS batch in our project. Informatica installation part is fine with us. But concern is how we can convert huge number of Batch to unix shell script.

Is there any translator or converter available to do this? It will be a great great help.

Regards,
MG

Mithun Goswami

unread,
Apr 15, 2013, 2:40:34 AM4/15/13
to

Jasen Betts

unread,
Apr 15, 2013, 7:15:55 AM4/15/13
to
Anything interesting done in dos batch must be done in an arcane
and convoluted way. eg: comparing 2 numbers is about 20 lines of code.

(NT batch is not so bad) Probably your only option is to use dosemu to
invoke command.com torun the batches you need run until you can rewrite
them. (or use wine to launch cmd.exe, or 4nt (which is probably cheaper)
if they are win32 batches)

--
⚂⚃ 100% natural

John Hasler

unread,
Apr 15, 2013, 8:12:55 AM4/15/13
to
Mithun Goswami writes:
> We are planning to migrate our system from windows to linux.

I strongly suggest that you employ an expert to assist you.
--
John Hasler
jha...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

Whiskers

unread,
Apr 15, 2013, 9:03:40 AM4/15/13
to
On 2013-04-15, Mithun Goswami <mithoon...@gmail.com> wrote:
I doubt if there is any automatic way of converting a Batch file into a
shell script; there isn't a 1:1 command and option match.

But there are tools for using MS-DOS stuff in Linux - here are the
offerings in the main repos for the distro I use
<https://www.archlinux.org/packages/?sort=&q=dos&maintainer=&flagged=>

--
-- ^^^^^^^^^^
-- Whiskers
-- ~~~~~~~~~~

Vuk Vujovic

unread,
Apr 15, 2013, 6:23:34 PM4/15/13
to
Try this link:

http://www.softpedia.com/get/System/System-Miscellaneous/Adel-BAT2EXE.shtml

Convert .BAT files to .EXE and then run them from Linux wine package.

Install supported wine on your distribution from www.winehq.org

Best Regards,
Vuk Vujovic

Vuk Vujovic

unread,
Apr 15, 2013, 6:23:54 PM4/15/13
to
On 04/15/2013 08:40 AM, Mithun Goswami wrote:

Jasen Betts

unread,
Apr 16, 2013, 4:45:57 AM4/16/13
to
On 2013-04-15, Vuk Vujovic <vuk.v...@gmail.com> wrote:
> On 04/15/2013 08:40 AM, Mithun Goswami wrote:
>> Hi All,
>>
>> We are planning to migrate our system from windows to linux.
>>
>> We use Informatica and DOS batch in our project. Informatica installation part is fine with us. But concern is how we can convert huge number of Batch to unix shell script.
>>
>> Is there any translator or converter available to do this? It will be a great great help.
>>
>> Regards,
>> MG
>
> Try this link:
>
> http://www.softpedia.com/get/System/System-Miscellaneous/Adel-BAT2EXE.shtml

Nah that's not a batch compiler, it just converts bat programs into
self-extract - autorun archives.

source here: svn checkout svn://svn.code.sf.net/p/bat2exe/code-0/trunk bat2exe-code-0

DOS batch is one of the interpret-only languages


--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---

tittu.thom...@gmail.com

unread,
Dec 4, 2018, 11:39:29 AM12/4/18
to
Convert windows based batch file to linux based shell script.
https://www.onlinetoolsportal.com/online-batch-file-shell-script-converter/

Mike Easter

unread,
Dec 4, 2018, 11:50:50 AM12/4/18
to
ttp wrote:
> Convert windows based batch file to linux based shell script.
> https://www.onlinetoolsportal.com/online-batch-file-shell-script-converter/
>
That is an interesting idea. It seems to me that it would have to be a
very sophisticated program. I wonder what happens - what the result or
'error' is - when it is challenged with something that doesn't solve
according to its algo.

There are a zillion .bat files out there that one could choose to mess
around with it.


Googlegroups will let you choose a username so it doesn't have to use
your account address.

--
Mike Easter

J.O. Aho

unread,
Dec 4, 2018, 4:58:36 PM12/4/18
to
On 12/4/18 5:50 PM, Mike Easter wrote:
> ttp wrote:
>> Convert windows based batch file to linux based shell script.
>> https://www.example.com/online-batch-file-shell-script-converter/
>>
>>
> That is an interesting idea.  It seems to me that it would have to be a
> very sophisticated program.  I wonder what happens - what the result or
> 'error' is - when it is challenged with something that doesn't solve
> according to its algo.
>
> There are a zillion .bat files out there that one could choose to mess
> around with it.

Most of the bat-files will not be useful to run on a Linux/Unix system.

--

//Aho

Kenny McCormack

unread,
Dec 4, 2018, 5:02:08 PM12/4/18
to
In article <g6obka...@mid.individual.net>,
Yes, I'm too lazy to goto/access the site. Sue me.

But I'd like to see some discussion and examples here of some inputs and
outputs from this process.

Natually, I'm as sceptical as anyone about both the efficacy and the
utility of this conversion process.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/GodDelusion

Jasen Betts

unread,
Dec 5, 2018, 1:31:07 AM12/5/18
to
On 2018-12-04, Kenny McCormack <gaz...@shell.xmission.com> wrote:
> In article <g6obka...@mid.individual.net>,
> J.O. Aho <us...@example.net> wrote:
>>On 12/4/18 5:50 PM, Mike Easter wrote:
>>> ttp wrote:
>>>> Convert windows based batch file to linux based shell script.
>>>> https://www.example.com/online-batch-file-shell-script-converter/
>>>>
>>>>
>>> That is an interesting idea.  It seems to me that it would have to be a
>>> very sophisticated program.  I wonder what happens - what the result or
>>> 'error' is - when it is challenged with something that doesn't solve
>>> according to its algo.
>>>
>>> There are a zillion .bat files out there that one could choose to mess
>>> around with it.
>>
>>Most of the bat-files will not be useful to run on a Linux/Unix system.
>
> Yes, I'm too lazy to goto/access the site. Sue me.
>
> But I'd like to see some discussion and examples here of some inputs and
> outputs from this process.
>
> Natually, I'm as sceptical as anyone about both the efficacy and the
> utility of this conversion process.

It doesn't work. it fails on simple constructs like "if errorlevel"


In dos 3 batch was dragged kicking and screaming into turing
completeness, it took like 50 lines of code to add two numbers.


later versions had arithmetic built in.

--
When I tried casting out nines I made a hash of it.
0 new messages