benjamin gerard <[EMAIL PROTECTED]> writes:

> $expr 'a0b' : 'a\(.\)b' \| '1
>
> The previous sample returns '1'. I assume this is because the matching
> pattern is '0' and it is evaluate as false.
>
> I am just wandering if this is expected behaviour ?

You have just answered you question above.

expr1 | expr2 Returns the evaluation of expr1 if it is neither null nor
              zero; otherwise, returns the evaluation of expr2 if it is
              not null; otherwise, zero.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux AG, Maxfeldstra�e 5, 90409 N�rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to