converting C++ code into Korn and C shell

converting C++ code into Korn and C shell

Post by Gordon Byrn » Sun, 10 Feb 2002 09:35:35



Hey, I have a school assignment that has me converting a C++ program into
Korn shell script and C shell script.  I have looked in a couple of books
and still have not found like a conversion key or even a sample program that
I can take some hints from.  Does any one have any ideas as to where I can
look for some extra help with this?  I don't want anyone to do it for me but
I sure could use some direction.

Thanks in advance,

Gordy

 
 
 

converting C++ code into Korn and C shell

Post by Mark Gordo » Sun, 10 Feb 2002 09:50:58


It appears that sometime around Sat, 09 Feb 2002 00:35:35 GMT, "Gordon

Quote:>Hey, I have a school assignment that has me converting a C++ program into
>Korn shell script and C shell script.  I have looked in a couple of books
>and still have not found like a conversion key or even a sample program that
>I can take some hints from.  Does any one have any ideas as to where I can
>look for some extra help with this?  I don't want anyone to do it for me but
>I sure could use some direction.

If you want to do a good job of it then IMHO the best thing to do is
work out what the program does and then write a script to do that job
rather than trying to convert from C++ to a scripting language.
--
Mark Gordon - To email me replace spamtrap with mark.gordon
    This message has been brought to you by the Flash AI Responder.
    No humans were harmed (or involved in any way) in its production.

 
 
 

converting C++ code into Korn and C shell

Post by Bit Twist » Sun, 10 Feb 2002 10:10:55



> Hey, I have a school assignment that has me converting a C++ program into
> Korn shell script and C shell script.  I have looked in a couple of books
> and still have not found like a conversion key or even a sample program that
> I can take some hints from.  Does any one have any ideas as to where I can
> look for some extra help with this?  I don't want anyone to do it for me but
> I sure could use some direction.

If nothing else, flow chart the C++.
code in the Korn and csh language.

Here is info on bash, pretty close to Korn.
http://www.linuxdoc.org/LDP/abs/html/index.html

 
 
 

converting C++ code into Korn and C shell

Post by Gordon Byrn » Thu, 14 Feb 2002 00:10:37


What does IMHO mean?

> It appears that sometime around Sat, 09 Feb 2002 00:35:35 GMT, "Gordon

> >Hey, I have a school assignment that has me converting a C++ program into
> >Korn shell script and C shell script.  I have looked in a couple of books
> >and still have not found like a conversion key or even a sample program
that
> >I can take some hints from.  Does any one have any ideas as to where I
can
> >look for some extra help with this?  I don't want anyone to do it for me
but
> >I sure could use some direction.

> If you want to do a good job of it then IMHO the best thing to do is
> work out what the program does and then write a script to do that job
> rather than trying to convert from C++ to a scripting language.
> --
> Mark Gordon - To email me replace spamtrap with mark.gordon
>     This message has been brought to you by the Flash AI Responder.
>     No humans were harmed (or involved in any way) in its production.

 
 
 

converting C++ code into Korn and C shell

Post by Lew Pitch » Thu, 14 Feb 2002 00:58:16




Quote:>What does IMHO mean?

I = In
M = My
H = Humble
O = Opinion

[snip

Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group

(Opinions expressed are my own, not my employer's.)

 
 
 

converting C++ code into Korn and C shell

Post by those who know me have no need of my nam » Thu, 14 Feb 2002 01:51:33



Quote:>What does IMHO mean?

<www.acronymfinder.com/af-query.asp?acronym=imho>

--
okay, have a sig then

 
 
 

converting C++ code into Korn and C shell

Post by Mark Gordo » Thu, 14 Feb 2002 08:17:20


It appears that sometime around Tue, 12 Feb 2002 15:58:16 GMT,



>>What does IMHO mean?

>I = In
>M = My
>H = Humble
>O = Opinion

However, as I am a dyslexic it is always possible that I meant "In Her
Majesties Opinion."
--
Mark Gordon
Dyslexic Programmer.
At least the compiler ensures I spell variable names consistently wrong.
 
 
 

converting C++ code into Korn and C shell

Post by NOUSHI Red » Sat, 16 Feb 2002 03:20:35



> Here is info on bash, pretty close to Korn.
> http://www.linuxdoc.org/LDP/abs/html/index.html

'man ksh' contains the hole language syntax.

--
GCE/E/IT/M/SS !d---(+) s+:+(++:++) a-- C++ ULS++ P+? L+++ E+(++)
W++(+++)
 N++ o? K? w--- O! M! V! PS+ PE-() Y+(++) PGP! 5! t! R!* b+ DI(+)
D!(+++)
 G e++ h++() r y+(+++++)

 
 
 

converting C++ code into Korn and C shell

Post by Wayne W. Chen » Mon, 25 Feb 2002 14:12:06



> Hey, I have a school assignment that has me converting a C++ program into
> Korn shell script and C shell script.  I have looked in a couple of books
> and still have not found like a conversion key or even a sample program that
> I can take some hints from.  Does any one have any ideas as to where I can
> look for some extra help with this?  I don't want anyone to do it for me but
> I sure could use some direction.

You can try to convert C++ code to C script for your task using
Ch. Ch is the most complete C interpreter with C++ class features.
The best is that it is a C compatible shell, why csh is just
a C like Shell. Check for the comprison of C shell and
Ch shell at http://www.softintegration.com/docs/ch/shell/

I think Ch  is a best fit for your task. The product is also free
for academic use. More information about Ch can be found at
http://www.softintegration.com

Quote:

> Thanks in advance,

> Gordy

 
 
 

1. Convert Bash shell script to Korn shell script

The following bash script works fine to delete all files that are
older than $1 minutes. To execute this script,
bash cleanup +10

find /mypath -type f -cmin $1 -exec rm -f {} \;

Unfortunately, now I just realize I need to make it work in Korn
Shell. Even I
change the header from #!/bin/bash to #!/usr/bin/ksh, and execute the
script by ksh cleanup +10, it still have
different errors:

cleanup[9]: -cmin:  not found.
cleanup[10]: -type:  not found.

Looks like it doesn't work anymore. I think I need to re-write the
Korn Shell script that do the task.
I tried to search for equivalent Korn shell commands but unsuccessful.

Please help. thanks!!

2. XF86Config (sony monitor timings)?

3. best korn shell resources and is there a korn shell faq

4. fix for xxgdb problem

5. Anybody good at converting some qbasic code into a C++ unix aix console program??

6. Installation problem of X86, 2.5

7. Korn/Bourne shell return code precision

8. Fix prefetch patching in 2.5-bk

9. Korn Shell source code/executable..

10. where to get korn shell source code for RH9 linux

11. WKSH Windowing Korn Shell Source Code

12. Korn-shell coding help needed immediately!

13. shell code compiler (shell script -> C code)