[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expr bug
From: |
Jim Meyering |
Subject: |
Re: expr bug |
Date: |
Wed, 28 May 2003 12:12:40 +0200 |
yuval <address@hidden> wrote:
> On linux:
> "expr match" always fails when the length of the match is 0 even
> though there are cases when 0-length match should
> be considered a match:
>
> > expr match "" " *"
>
> This command has output 0 and exit status 1.
Thanks for the report, but that behavior is required.
The `0' output string is required because that is
the length of the match in this case. And whenever
expr's output expression is `null or 0', then it must
also exit with a status of 1.
FYI, if you're still using expr from the sh-utils package,
you should consider upgrading:
ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2
(coreutils is the union of fileutils, textutils, and sh-utils)
- expr bug, yuval, 2003/05/27
- Re: expr bug,
Jim Meyering <=