On 09/02/2016 09:25 AM, Eric Blake wrote:
>
> So while a lone '[' is unspecified in a normal BRE, it is well-defined
> in a shell filename pattern matching context. Since '[' is not a
> bracket expression, it MUST be treated as a literal '[', so ${foo#[}
> MUST strip the leading [ from the contents of foo, without requiring
> that the [ be quoted.Rationale: The '[' shell builtin is not undefined behavior. This was a specific addition made in POSIX 2008 that was not present in POSIX 2001 (although I can't easily find the bug report that justified it, since the bugs for POSIX 2008 predate the current austingroupbugs.net database) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
