ksh on UNIX and Linux



Thread Tools Search this Thread
# 1  
Old 10-30-2013
ksh on UNIX and Linux


Would the same version of Korn Shell (let's say ksh93) would use the same syntax on UNIX and LINUX and work exactly the same? Thanks
# 2  
Old 10-30-2013
I remember the times when you were taught shell basics, and so was pure sh for compatibility, it is also true for ksh... things may change when it comes to advanced features and extensions where it may differ depending of implementation ( and so KSH93 or KSH88 with posix extension...) ... In other words if your shellscript is pure standard ksh it has no reason to not be compatible between UNIX variants or LINUX so sticking to old syntax will almost always work, recent fany extension may give surprises...
I stick to old ksh to be sure I have no problem when copying my scripts from HP-UX to Solaris or AIX thought its more AIX to solaris and linux now... (AIX has ksh93 ( the server I squat I upgraded to 7.1 so not sure about the other releases...) HP-UX 11.11 is not KSH93 nor is Solaris 10 ksh)

Last edited by vbe; 10-30-2013 at 12:55 PM.. Reason: addendum
This User Gave Thanks to vbe For This Post:
rdogadin (10-30-2013)
# 3  
Old 10-30-2013
Many enhancements have been made to ksh93, over the years. If you use the same version of ksh93 on all platforms (ksh --version will tell you) you should not have compatibility problems on different platforms (unless mentioned in de man page ( printf "%T()" comes to mind..). If you stick with the original ksh93 syntax, your script should work with any ksh93 version, including the /usr/dt/bin/dtksh that is present by default on some of the UNICES .

Last edited by Scrutinizer; 10-30-2013 at 02:55 PM..
This User Gave Thanks to Scrutinizer For This Post:
rdogadin (10-30-2013)
# 4  
Old 10-30-2013
Thank you guys. This is very helpful.

Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Linux ksh script not working in crontab mrn6430 Red Hat 1 12-16-2015 09:12 PM
Which is the better platform to learn UNIX/Linux (Kali Linux Vs. Red Hat or other)? ApacheOmega Fedora 12 01-12-2015 01:33 PM
Dot sourcing differences in ksh, AIX vs Linux vs Solaris charles_n_may UNIX for Advanced & Expert Users 9 02-10-2014 06:17 PM
UNIX ksh Copy Files Script PerlHaven2k UNIX for Dummies Questions & Answers 5 01-06-2014 11:27 AM
ksh script migration from Solaris to Linux. Shivdatta Shell Programming and Scripting 6 09-04-2013 05:12 AM
AWK Program Not Executing On Linux with KSH JolietJake Shell Programming and Scripting 5 05-17-2012 04:30 PM
clear in Linux ksh pradebban Linux 2 05-26-2011 03:21 PM
Newline charachter in Ksh-Linux Sanju1236 Shell Programming and Scripting 3 01-18-2010 05:06 PM
New line character problem with ksh on Redhat Linux rijeshpp Shell Programming and Scripting 5 12-23-2009 02:02 AM
Ksh(Unix Distro) script Demon002 Shell Programming and Scripting 4 08-30-2009 06:41 AM
Need to cut filename in LINUX ksh juliyp Shell Programming and Scripting 10 06-09-2009 10:38 AM
If and Or Condition in Unix [ksh] leemjesse Shell Programming and Scripting 2 01-03-2006 01:57 PM
ksh/Linux: Variable scoping issue? Pl. help! jasmeet100 Shell Programming and Scripting 2 09-30-2005 07:35 PM
Script Migration From HP to Linux (KSH) Omkumar Shell Programming and Scripting 1 09-02-2005 10:44 AM
KSH UNIX documentation Filippo UNIX for Dummies Questions & Answers 1 07-27-2005 06:19 AM
All times are GMT -4. The time now is 04:16 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?