[Top][All Lists]

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

Re: Bug in extended pattern matching *!()

From: Chet Ramey
Subject: Re: Bug in extended pattern matching *!()
Date: Thu, 27 Sep 2012 20:58:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0

On 9/26/12 10:07 PM, address@hidden wrote:
> See also this thread: http://stackoverflow.com/questions/12596468/
> It looks like there is some bug in the pattern matcher
> $ shopt -s extglob
> $ touch a ab ba
> $ echo a*!(x)
> Expected result:
> a ab
> Experienced result:
> ab

The question is whether or not !(x) should match the empty string.  The
bash matcher treats it similarly to [!x], which does not.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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