Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* expr bug ?
@ 2004-12-19 14:27 Urs Traber
  2004-12-23 17:08 ` Tom Woodburn
  0 siblings, 1 reply; 2+ messages in thread
From: Urs Traber @ 2004-12-19 14:27 UTC (permalink / raw)


Hello all,

I've come across a problem while building a software product kits that
should have a version code starting with 0, e.g. 097. My subset
control program (e.g. SSLBIN097.scp) sources
/usr/share/lib/shell/libscp, which is using expr to set _VCODE:

_VCODE = `expr $_SUB : '^.*\(...\)$'`

which would evaluate with the above scp script to

_VCODE = `expr SSLBIN097 : '^.*\(...\)$'`

and assign 97 to _VCODE - which is bad! Every reference to _VCODE in
libscp and all scp scripts causes buggy behaviour! Dependency locking,
creating backward links, etc. all doesn't work anymore.

Variations like

expr substr SSLBIN097 7 3

also produce 97

I've seen this behaviour on 4.0B, E and F systems. Before I come up
with a workaround: Does anyone know if "expr" has been fixed/changed
in a patch kit?

Thanks for your help
Urs

By the way: The GNU version of expr (contained in sh-utils 2.0)
produces 097.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-23 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-19 14:27 expr bug ? Urs Traber
2004-12-23 17:08 ` Tom Woodburn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox