Running the sh shell(/bin/sh) on dUNIX 3.2D-1
#c=`expr substr 0089 2 3`
#set
.
.
c=089
Running same shell on dUNIX 4.0b
#c=`expr substr 0089 2 3`
#set
.
.
c=89
Under 4.0b, if the string is 0000 instead of 0089, the result is 0,
not the result of 000 under 3.2D-1. Placing " around the 0000 did not
change the result.
The above example is simplified from actual use for clarity.
I have been told by CSC that expr was modified for POSIX
compliance and to use expr from 3.2 as a workaround.
Would a POSIX expert please indicate whether the 4.0b version
of expr for the substr operand is indeed acting "correctly"?
TIA
Bob Fulton
bob.fulton_at_zenithe.com
Received on Thu Sep 18 1997 - 00:42:21 NZST