Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: urs.traber@swissonline.ch (Urs Traber)
Subject: expr bug ?
Date: 19 Dec 2004 06:27:14 -0800	[thread overview]
Message-ID: <fcc8fc17.0412190627.708a5313@posting.google.com> (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.


             reply	other threads:[~2004-12-19 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-19 14:27 Urs Traber [this message]
2004-12-23 17:08 ` expr bug ? Tom Woodburn
read-only archive

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