Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Question about extended globbing



    Hi David :)

 * Davilín <david@xxxxxxxxxxxx> dixit:
> grep something $FOO/^{*txt,*info}
> 
> but it didn't work. How can I achieve to include several alternatives with
> the ^ operator?

    Like this: grep something $FOO/^(*txt|*info)

    I may be wrong, of course, but I think that the braces you are
using are took literally in the pattern, or they are used just for
brace expansion, generating something like:

    grep something $FOO/^*txt $FOO/^*info

    That way, when filename generation takes place, it expands the
first expression, which include any *info file, and then it expands
the second expression, which contains any *txt file.

    I think we are in the second case, brace expansion and after that
filename generation. See if you have dupes in the generated file list
(use 'print' instead of grep. I've done and I have two lists, the
first doesn't include any *txt file, the second doesn't include any
*info file).

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/



Messages sorted by: Reverse Date, Date, Thread, Author