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 01-11-2017
alltaken alltaken is offline
Registered User
 
Join Date: Dec 2016
Last Activity: 9 February 2017, 2:24 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; 01-11-2017 at 05:01 AM.. Reason: Changed ICODE to CODE tags.
Sponsored Links
    #2  
Old Unix and Linux 01-11-2017
RavinderSingh13 RavinderSingh13 is online now Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 27 February 2017, 1:02 PM EST
Location: Chennai
Posts: 2,377
Thanks: 529
Thanked 1,111 Times in 1,001 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 01-11-2017
alltaken alltaken is offline
Registered User
 
Join Date: Dec 2016
Last Activity: 9 February 2017, 2:24 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; 01-11-2017 at 05:03 AM.. Reason: Changed ICODE to CODE tags.
    #4  
Old Unix and Linux 01-11-2017
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 27 February 2017, 11:28 AM EST
Posts: 1,027
Thanks: 28
Thanked 294 Times in 257 Posts
How about :

Code:
strings $(which ksh) | grep Version

Sponsored Links
    #5  
Old Unix and Linux 01-11-2017
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 27 February 2017, 11:52 AM EST
Location: Saskatchewan
Posts: 21,940
Thanks: 1,051
Thanked 4,102 Times in 3,800 Posts
If the substring operator works, i.e. ${VAR:1:2} then it's not ksh88.
Sponsored Links
    #6  
Old Unix and Linux 01-11-2017
Chubler_XL's Unix or Linux Image
Chubler_XL Chubler_XL is offline Forum Staff  
Moderator
 
Join Date: Oct 2010
Last Activity: 26 February 2017, 2:36 PM EST
Posts: 3,371
Thanks: 141
Thanked 1,169 Times in 1,081 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 01-11-2017
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 26 February 2017, 2:34 PM EST
Location: Loughborough
Posts: 1,149
Thanks: 344
Thanked 302 Times in 232 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 02:07 PM.