paperlined.org
apps > ksh
document updated 11 years ago, on Oct 12, 2013

To find out what version of Ksh you have installed on your machine:

escape key sequence

Type this, followed by enter: And then press these keys:
  1. press escape
  2. press ctrl-v
It will display something like:

programmatic methods

builtin 2>&1 | wc -l builtin echo hi ksh --version ${.sh.version} $KSH_VERSION $ERRNO set -o
ksh88 1
builtin:  not found
bad option bad substitution not set is set
ksh93 >1
builtin: hi: not found
bad option Version M-12/28/93e not set not set
pdksh 0
hi
unknown option bad substitution @(#)PD KSH v5.2.14 99/07/13.2 not set adds braceexpand, login, nohup, physical, posix, stdin, vi-esccomplete, vi-show8, vi-tabcomplete

scripted test

if [ "$BASH" ]; then echo bash; elif [ "$ERRNO" ]; then echo ksh88; elif [ "$(builtin)" ]; then echo ksh93; else echo pdksh; fi