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


Closed    
 
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 04: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: 23 July 2017, 2:48 AM EDT
Location: Chennai
Posts: 2,555
Thanks: 563
Thanked 1,208 Times in 1,087 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 04: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: 22 July 2017, 2:04 AM EDT
Posts: 1,061
Thanks: 30
Thanked 308 Times in 270 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: 21 July 2017, 2:59 PM EDT
Location: Saskatchewan
Posts: 22,291
Thanks: 1,110
Thanked 4,204 Times in 3,888 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: 20 July 2017, 10:07 PM EDT
Posts: 3,414
Thanks: 144
Thanked 1,209 Times in 1,109 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: 19 July 2017, 2:30 PM EDT
Location: Loughborough
Posts: 1,212
Thanks: 364
Thanked 322 Times in 252 Posts
As an addendum to Corona688's reply...

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

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 08:41 PM
Copy a file from directroy/ prior version to the directory/ new version roy1912 Shell Programming and Scripting 4 04-29-2013 12: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 02:49 PM
Migrate unix version 8 to version 9 lsy Solaris 2 09-16-2008 01:00 AM
What OS version am I on? rein UNIX for Dummies Questions & Answers 3 03-08-2006 08:57 AM



All times are GMT -4. The time now is 02:49 AM.