bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: find: support all shell wildcards


From: Stepan Kasal
Subject: Re: find: support all shell wildcards
Date: Tue, 18 Mar 2003 16:28:29 +0100
User-agent: Mutt/1.2.5.1i

Hello,

On Tue, Mar 18, 2003 at 02:35:35PM +0000, address@hidden wrote:
> This is a bit ambiguous because it seems to say that shell patterns are 
> supported but then says that only *, ? and [] are metacharacters - whereas 
> the shell also has {}.  Anyway, find does not support {} shell wildcards:

this definitely is not a bug, as brace expansion is not part of
shell patterns.

First, it bash extension, it is incompatible with traditional Bourne
style shells.

Another, more important argument is this: in bash, brace expansion presents
a separate step, it's not part of pattern expansion.  That is why it works
even if the files do not exist:
        touch {a,b}

And that's also why it doesn't work in ``case'' even though pattern
expansion is performed there.  Consider the following script:
        #!/bin/bash
        case $1 in
                {a,c})
                        echo a;;
                b)
                        echo b;;
        esac

To conclude, I beleive it's not a bug but a request for enhancement.
I'm not sure whether it fits into the tradition of the find command;
I'd have to think about it if I were asked.

If you need it, go ahead and write it.  Or make someone to do it for you.
If you want it distributed as part of GNU findutils package, you should
contact the maintainer first, too see whether he is willing to accept it.

HTH,
        Stepan Kasal




reply via email to

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