From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,5831375e51156f27,start X-Google-Attributes: gidfa528,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: urs.traber@swissonline.ch (Urs Traber) Newsgroups: comp.unix.tru64 Subject: expr bug ? Date: 19 Dec 2004 06:27:14 -0800 Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 146.188.50.17 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1103466434 9798 127.0.0.1 (19 Dec 2004 14:27:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 19 Dec 2004 14:27:14 +0000 (UTC) Xref: g2news1.google.com comp.unix.tru64:438 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.