Re: arithmetic substitution in while loop in MKS Korn shell

From: David Thompson (
Date: 10/02/03

Date: Thu, 02 Oct 2003 03:11:45 GMT

"Chris F.A. Johnson" <> wrote

> the MKS Korn shell is supposed to be compatible with ksh93.


I don't think that's quite true. MKS provides a subset only,
but I've never seen it fully documented just what this subset
is. For example, ksh93 supports arithmetic expressions using
the (( expr )) syntax,

  (( X = X + 1 ))

but MKS most definitely does not.

ksh93 has 1) arithmetic expressions and 2) arithmetic substitutions,
but MKS only has #2, ie,

  1) arithmetic expression (( X = X + 1 ))
  2) arithmetic substitution X=$(( X + 1 ))

OTOH, I've never seen explicit claims to be a subset of ksh93,
or be compatible with ksh93 either. Ie, this page below never
mentions ksh93,

although it does mention POSIX.2 compatibility.

David Thompson
Foster City, CA