convert a file from .ksh to .sh


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers convert a file from .ksh to .sh
# 1  
Old 06-11-2010
Data convert a file from .ksh to .sh

hi
I have written a shell scrpit in .ksh mode. I need to convert this scritp to .sh. What things i need to check while converting the file from .ksh to .sh.

Could you please help me out.
Thanks&Reagdrs
Pavan Kumar
# 2  
Old 06-11-2010
Since we have no idea what is in your script it will be imposssible to answer...
The best for you is to look at what ksh can do sh cant, and see if you have anything like in your script...
# 3  
Old 06-11-2010
The most obvious is arrays, ksh has them and vanilla bourne sh does not. But there are a lot of features like that, listing comprehensively would be difficult. And on many systems, /bin/sh is not even a vanilla bourne shell, but something more primitive. What's your system?

Last edited by Corona688; 06-11-2010 at 12:09 PM..
# 4  
Old 06-15-2010
On modern O/S "sh" often is the Posix Shell not the old Bourne Shell.
What Operating System and version was the scrript written for in ksh, and what Operating System and version is going to run the script?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to convert string(variable) into date( epoch) in ksh on HPUX machine?

Hi all, I have used a bash script which ultimately converts a string into date using date --date option: DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime Please use code tags... (7 Replies)
Discussion started by: Rashu123
7 Replies

2. Shell Programming and Scripting

Convert Hex - KSH

Hello, I woild like to convert hex on KSH not BASH: I tried to use: tmp=31 printf "\x"${tmp}"" it works on bash - Output is '1' but not on ksh. please advice on the right syntax. Thanks. (4 Replies)
Discussion started by: LiorAmitai
4 Replies

3. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

4. Shell Programming and Scripting

convert ksh to C program

Hi Guys...is there a way to convert a .ksh script to .C program..? (3 Replies)
Discussion started by: aggars
3 Replies

5. Shell Programming and Scripting

Convert from CSV to space padded columns (.ksh)

Hello, Could someone please help me to convert a string(s) of comma separated values into space padded columns in .ksh? ex. 10-21-2008,someword,blah,127.0.0.1,8,3 10-21-2008,randomword,ick,128.0.111.128,1,0 converted to 10-21-2008 someword blah 127.0.0.1 8... (6 Replies)
Discussion started by: WhotheWhat
6 Replies

6. Shell Programming and Scripting

Need to convert ksh script to Perl

Guys I am new to this forum, this may seem like a cheeky request. I have been asked by my manager to convert this ksh script to Perl. I do not have the foggiest about Perl and would appreciate any help on this. Basically this scipt automates a recovery process for EMC Legato Networker. It will... (1 Reply)
Discussion started by: rahimm1
1 Replies

7. Shell Programming and Scripting

python code...convert to ksh or sh

Helloo... I am not much familiar with python..I found this small script in python I even do not have python on my computer...can anyone help me out to convert this into ksh or sh.. PLEASE any help I will appreciate.. here is python code.. #!/usr/bin/env python import random # Get a... (3 Replies)
Discussion started by: amon
3 Replies

8. Shell Programming and Scripting

how to convert unix .ksh script to windows .batch script

I am using awk in my .ksh script but when I am trying to run in windows its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like. thanx. #!/bin/ksh egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies

9. Shell Programming and Scripting

Newbie convert date ksh

If I have start = 02282006; end = 03152006; How do I get startdate = 02/28/2006; enddate = 03/15/2006; Thanks, (3 Replies)
Discussion started by: britney
3 Replies

10. UNIX for Dummies Questions & Answers

convert from ksh to bsh

How difficult is it to convert from bourn shell to korn shell and visversa. Reason: If someone bombsout or logs out incorrectly the application we are using give the next person to log in the same permissions as the person that bombed out. Therefore createing ownership problems on print files. (2 Replies)
Discussion started by: Boyd Young
2 Replies
Login or Register to Ask a Question