Operating System - HP-UX
1833649 Members
4951 Online
110062 Solutions
New Discussion

Script to C source code converter

 
Deepak_5
Advisor

Script to C source code converter

Hi,

I want to convert scripts written in ksh
to pure C programs.

Are there any tools, which can be used.
The intention is to make it work on Windows as well.

Please Note: I have heard abould MKS Tool Kit
which can run scripts on Windows as well, but
do not want to use it.

Please let me know, if anyone has an idea
Thanks and Regards
Deepak
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: Script to C source code converter

Hi Deepak,

There is one commercial tool available that does the job well 'ShellLock' from Cactus International. The price is quite reasonable.
http://www.lonetar.com

Regards, Clay



If it ain't broke, I can fix that.
Shannon Petry
Honored Contributor

Re: Script to C source code converter

Boy oh boy, all these people wanting their Unix scripts/code to run on the very closed windows platform! I would say the port from UNIX to Windblows will be the biggest challenge! How many system calls match between UNIX and Win32? not too many! Well, I guess we can all dream....

I have never seen a product that can do what you want. Why? Well it's like writing Fortran code, and expecting it to convert and compile into C++. There are a few GNU code converters, but shell logic can vary so much that I dont know how good even a commercial converter would do, unless it is very simple scripting. I would say that you will still have to make a ton of modifications to make it work. Meaning simple text entry and manipulation, or numerical stuff....will work, and perhaps looping. Anything requiring a system call though would more than likely have to be recoded.

Best of luck, and it may be worth looking at opensource developers to code for you! It'll be a bit less money than a software house, and you'd get exactly what you want instead of what a software house gives you!

Regards,
Shannon
Microsoft. When do you want a virus today?
Deepak_5
Advisor

Re: Script to C source code converter

Hi Shannon,

Can you please name some gnu code converters, which would convert shell script to C code.

I tried at www.gnu.org, but did not quite
find one.

Thanks and Regards
Deepak