Hi Akim,
Akim Demaille wrote:
>
> Hi David,
>
> Sorry for the delays. I find it hard to understand how broken your
> expr is. just to be sure, this refers to QNX 4.2.5 right?
No worry about the delay.
This does refer to QNX 4.2.5
>
> | > expr 'a' : '\(a\)' || echo failure
> |
> | Gives:
> | a
> | failure
>
> Here, $? is wrong, but the output is correct.
Correct
>
> | > expr 'a' : '\(b\)' && echo failure
> |
> | Gives:
> | 0
>
> Result is wrong, $? right.
Wrong explanation - no characters match so the output of 0 is correct
(At least I think so)
>
> | > expr 'a' : 'a' || echo failure
> |
> | Gives:
> | 1
>
> Result and $? are right.
Correct
>
> | > expr 'a' : 'b' && echo failure
> |
> | Gives
> | 0
>
> Result and $? are right.
Correct
>
> Man! Did I miss something? David, could you double check this is
> right? Paul, what do you think about this?
I retested all these it appears the \( \) constructs return the wrong exit
status in 4.2.5 - it seems to always be 1.
>From what Pavel said they are fixed in Neutrino. (The next/future release)
Hope this helps
David