Hi,
Being a CSH programmer I will ask before you are SLAMMED by the KSH programmers in this forum.
Why would you want to convert your scripts?
that being said
I would suggest picking up the CSH MAN page and going through your script one line at a time and looking throught the MAN PAGE to see how to convert the line to the equivelent CSH.
Once you have done 10's or100's of conversions you should be fairly well versed in CSH.
If there is something specific you need to know how to do it post it here and if it isn't like your your home work assignement or something, the friendly people at tek-tips will probably help you.
there are thing that are very similiar in the scripts but just slightly different
if ( $a == 1 ) then
do something
endif
set a = "blort"
-------------------------
CSH is Significantly lacking is the READ capability.
in KSH
while read line <&4
I have found no good alternative for this in CSH. I have my work arounds.
I would also recommend looking at Chapter 3 of Unix in a Nutshell. It has a list of common features and differing features of the Bourne, Korn and C shells. The rest of the book would also probably be useful for something like this.
But you were probably looking for something a little more automated?
tdatgod - I need to convert some scripts (related to printing and source code control) for other development teams that use the C shell.
bi - An automated process would be nice, but not necessary. This is an ongoing 'side' project I'm working on, and I'm actually looking forward to learning more about Unix. I'll probably pick up 'Unix in a Nutshell' this weekend.
> for other development teams that use the C shell
If the scripts begin
Code:
#!/bin/ksh
They shouldn't need to know/care what they are written in.
The fact that they are written in ksh is less of a maintenance problem that having two 'bug incompatible' versions (one in ksh and one in csh) floating about the system.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.