To find out what version of Ksh you have installed on your machine:
set -o viAnd then press these keys:
Version M-11/16/88i ⇒ KSH-88 Version M-12/28/93 ⇒ KSH-93 @(#)PD KSH v5.2.14 99/07/13.2 ⇒ PD-KSH
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 |
if [ "$BASH" ]; then echo bash; elif [ "$ERRNO" ]; then echo ksh88; elif [ "$(builtin)" ]; then echo ksh93; else echo pdksh; fi