Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change in Tru64 Unix expr behavior

3 views
Skip to first unread message

Cameron Laird

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
With
OSF1 bread.ecu.net V4.0 1091 alpha
the result of
cmd=12345
/usr/bin/expr x$cmd : 'x..\(...\)'
cmd=00000
/usr/bin/expr x$cmd : 'x..\(...\)'
is
345
0
instead of the
345
000
I expect, that I observe on all other Unixes at hand, and that
I believe was true for older OSF1s. What's the story?
--

Cameron Laird <cla...@NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html

Ken Pizzini

unread,
Mar 24, 2000, 3:00:00 AM3/24/00
to
On 22 Mar 2000 17:35:35 -0600,

Cameron Laird <cla...@starbase.neosoft.com> wrote:
>With
> OSF1 bread.ecu.net V4.0 1091 alpha
>the result of
> cmd=12345
> /usr/bin/expr x$cmd : 'x..\(...\)'
> cmd=00000
> /usr/bin/expr x$cmd : 'x..\(...\)'
>is
> 345
> 0
>instead of the
> 345
> 000
>I expect, that I observe on all other Unixes at hand, and that
>I believe was true for older OSF1s. What's the story?

I don't know what the story is, but I'd guess that that revision
of expr has a bug where it treats the result of a : match as a
numeric value if the match consists soley of digits. I suggest
that a bug report to the vendor is in order...

--Ken Pizzini

Bob Harris

unread,
Mar 24, 2000, 3:00:00 AM3/24/00
to cla...@starbase.neosoft.com
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]

>Cameron Laird <cla...@starbase.neosoft.com> wrote:
>>With OSF1 bread.ecu.net V4.0 1091 alpha the result of
>> cmd=12345
>> /usr/bin/expr x$cmd : 'x..\(...\)'
>> cmd=00000
>> /usr/bin/expr x$cmd : 'x..\(...\)'

>>is instead of
>> 345 345
>> 0 000

This is a known problem.

You should be able to get a patch kit for this (and other known
problems) at:

<http://www.support.compaq.com/patches/index.html>

0 new messages