[Bug 203279] /bin/expr operator : fails when the string has a leading hyphen.

Garrett Cooper yaneurabeya at gmail.com
Sun Oct 18 20:54:41 UTC 2015


> On Oct 18, 2015, at 12:25, bugzilla-noreply at freebsd.org wrote:
> 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203279
> 
> Jilles Tjoelker <jilles at FreeBSD.org> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |jilles at FreeBSD.org
> 
> --- Comment #1 from Jilles Tjoelker <jilles at FreeBSD.org> ---
> If options that take an option-argument of ":" can be excluded forever, a
> simple workaround would be to skip option processing if there are 3 arguments
> (excluding argv[0]) and the second argument is ":".
> 
> A stronger form of only treating "--" and "-e" as options would prevent adding
> any more options without compatibility problems.
> 
> Perhaps this is acceptable, since expr is not a utility where major extensions
> are expected.

It would also make FreeBSD more compatible with Linux/NetBSD.


More information about the freebsd-bugs mailing list