On Wed, Apr 24, 2019 at 09:58:42AM -0400, Chet Ramey wrote: > The SVR4.2 Bourne shell, as another data point, behaves like bash. Since > it doesn't have arithmetic expansion, you have to use something it does > handle internally, like ${n:=2}. I don't know what ksh88, the other POSIX > historical reference implementation, does.
# uname -a HP-UX vandev B.10.20 A 9000/778 2000153729 two-user license # exec ksh # set -o vi # n=0; : $((n=n+1)); echo "$n" 1 # n=0; /bin/true > $((n=n+1)); echo "$n" 0 Looks like it changed between ksh88 and ksh93.