Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Missing math functions in OSR6's ksh93

22 views
Skip to first unread message

Roger Cornelius

unread,
Aug 1, 2019, 12:53:07 PM8/1/19
to
Has anyone else noticed that math functions (sqrt, abs, floor, etc) aren’t supported in the ksh93 supplied with OSR6, despite the manpage saying they are? Does anyone know why SCO chose to disable this functionality in the shell they provide?

Here’s a typescript from the ksh93 provided with Openserver 6:
Script started on Thu Aug 1 12:04:18 2019

$ uname -a
SCO_SV errgovm 5 6.0.0 i386

$ print ${.sh.version}
Version M 1993-12-28 s+

$ print $(( sqrt(32) ))
/bin/ksh93: sqrt(32) : unknown function

$ print $(( abs(-32) ))
/bin/ksh93: abs(-32) : unknown function

$ exit
Script done on Thu Aug 1 12:05:06 2019

Here’s a typescript from a ksh93 binary for Unixware, running on the same machine as above, which I retrieved from the ATT website several years ago. Math functions work here despite it being an earlier version of the shell than the one SCO provides with OSR6:
Script started on Thu Aug 1 12:05:52 2019

$ uname -a
SCO_SV errgovm 5 6.0.0 i386

$ print ${.sh.version}
Version M 1993-12-28 r

$ print $(( sqrt(32) ))
5.65685424949

$ print $(( abs(-32) ))
32

$ exit
Script done on Thu Aug 1 12:06:47 2019
0 new messages