bug-sh-utils
[Top][All Lists]
Advanced

[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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]