Re: Parameter expansion, patterns and fnmatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/09/16 16:51, Herbert Xu wrote:
On Fri, Sep 02, 2016 at 09:49:53AM -0500, Eric Blake wrote:
On 09/02/2016 09:29 AM, Herbert Xu wrote:
On Fri, Sep 02, 2016 at 09:25:15AM -0500, Eric Blake wrote:

This also affects

    case [a in [?) echo ok ;; *) echo bad ;; esac

which should print ok.

Even ksh prints bad here.

So ksh is also buggy.

Good luck writing a script with an unquoted [ expecting it to be
portable :)

[ '' ] || echo empty

There, I just wrote a portable script with unquoted [ portably
interpreted as itself and not as a bracket filename expansion pattern.

dash handles that just fine.  We're not talking about a lone [
in file expansion context here.

We were originally talking about the [ in ${foo#[}. That is a lone [ in pattern matching context, which is what file expansion context is.

We're talking about something that dash has had code to handle for >10 years, that's been documented by dash as supported for >10 years, and now that it turns out there's a flaw in the code where dash does not behave as documented and as clearly intended by the code, it's POSIX's fault?
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux