bug-bash
[Top][All Lists]
Advanced

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

Re: Some globstar patterns produce duplicate entries and a null filename


From: Roman Rakus
Subject: Re: Some globstar patterns produce duplicate entries and a null filename
Date: Tue, 11 Dec 2012 11:08:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/10/2012 11:29 PM, Chet Ramey wrote:
On 12/5/12 3:17 AM, Roman Rakus wrote:

Works well when used up to 2 levels of ** - ** and **/** is fixed.
However still produce duplicates, when used more levels - **/**/**. Also
produce duplicates for **/a/** form.

The next version will treat any sequence of **/** the same as **, so those
duplicates will be suppressed.

I'm going to argue that some duplicates are going to be expected when you
have patterns like **/a/** that can match the same directory name using
two different "paths," if you will.  Other shells that implement **, such
as ksh93, agree.  Imperfect, but there's not a good solution.

Chet



Interesting. So it is up to script writer to delete duplicates. Will you be interested in patch which will clear duplicates? Let's say it will be some function run after expansion. And it will be optionally turned on. I guess it will not have any higher glob execution time impact.

RR



reply via email to

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