Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

ksh version

Shell Programming and Scripting


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 1 Week Ago
alltaken alltaken is offline
Registered User
 
Join Date: Dec 2016
Last Activity: 18 January 2017, 6:59 AM EST
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
ksh version

Hi,

I am running Suse Linux 12.1 and I am using ksh. How do i get to know which ksh it is, ksh 88 or ksh93 ?


Code:
# echo $KSH_VERSION
echo $KSH_VERSION
@(#)LEGACY KSH R50 2014/06/29 openSUSE
#

running the above command gives some information but how do I know if it is ksh88 or 93 ?

Thanks.


Moderator's Comments:
ksh version Please use CODE tags as required by forum rules!

Last edited by RudiC; 1 Week Ago at 05:01 AM.. Reason: Changed ICODE to CODE tags.
Sponsored Links
    #2  
Old Unix and Linux 1 Week Ago
RavinderSingh13 RavinderSingh13 is online now Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 21 January 2017, 10:38 PM EST
Location: Chennai
Posts: 2,357
Thanks: 517
Thanked 1,096 Times in 993 Posts
Hello alltaken,

Could you please try following and let me know if this helps you.

Code:
strings /bin/ksh | grep Version | tail -2
OR
ksh --version

Thanks,
R. Singh
Sponsored Links
    #3  
Old Unix and Linux 1 Week Ago
alltaken alltaken is offline
Registered User
 
Join Date: Dec 2016
Last Activity: 18 January 2017, 6:59 AM EST
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Hi,
I already tried them. Below is the output:


Code:
# strings /bin/ksh | grep Version | tail -2
strings /bin/ksh | grep Version | tail -2
# ksh --version
ksh --version
ksh: ksh: --: unknown option
#

Thanks


Moderator's Comments:
ksh version Please use CODE tags correctly as required by forum rules!

Last edited by RudiC; 1 Week Ago at 05:03 AM.. Reason: Changed ICODE to CODE tags.
    #4  
Old Unix and Linux 1 Week Ago
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 21 January 2017, 2:06 PM EST
Posts: 1,016
Thanks: 27
Thanked 283 Times in 253 Posts
How about :

Code:
strings $(which ksh) | grep Version

Sponsored Links
    #5  
Old Unix and Linux 1 Week Ago
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 20 January 2017, 5:46 PM EST
Location: Saskatchewan
Posts: 21,780
Thanks: 1,027
Thanked 4,038 Times in 3,746 Posts
If the substring operator works, i.e. ${VAR:1:2} then it's not ksh88.
Sponsored Links
    #6  
Old Unix and Linux 1 Week Ago
Chubler_XL's Unix or Linux Image
Chubler_XL Chubler_XL is offline Forum Staff  
Moderator
 
Join Date: Oct 2010
Last Activity: 19 January 2017, 8:48 PM EST
Posts: 3,332
Thanks: 135
Thanked 1,137 Times in 1,058 Posts
I believe this shell is lksh LEGACY KSH which is built on MIRBSD KSH and is intended exclusively for running legacy shell scripts. It is not really intended as a login script and there is no explicit support for interactive use, nor any command line editing or history code.

Does your system have mksh as well? If so this would be a much closer match to ksh93 although date arithmetic is not supported.
Sponsored Links
    #7  
Old Unix and Linux 1 Week Ago
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 16 January 2017, 8:07 AM EST
Location: Loughborough
Posts: 1,127
Thanks: 329
Thanked 296 Times in 228 Posts
As an addendum to Corona688's reply...

'ksh88' does NOT have the -t option for the read statement.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
OS version and Firmware version ElizabethPJ Red Hat 1 07-02-2014 09:41 PM
Copy a file from directroy/ prior version to the directory/ new version roy1912 Shell Programming and Scripting 4 04-29-2013 01:04 PM
Advanced Search * View * Edit JAVA version to WORK in GLASSFISH Forum topic JAVA version lhareigh890 UNIX for Advanced & Expert Users 1 02-10-2011 03:49 PM
Migrate unix version 8 to version 9 lsy Solaris 2 09-16-2008 02:00 AM
What OS version am I on? rein UNIX for Dummies Questions & Answers 3 03-08-2006 09:57 AM



All times are GMT -4. The time now is 11:46 PM.