* dUNIX 4.0b expr substr dropping leading zeros
@ 1997-09-17 22:32 Bob Fulton
0 siblings, 0 replies; only message in thread
From: Bob Fulton @ 1997-09-17 22:32 UTC (permalink / raw)
To: tru64-unix-managers
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@zenithe.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-09-17 22:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-09-17 22:32 dUNIX 4.0b expr substr dropping leading zeros Bob Fulton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox