"Dustin J. Mitchell" <[email protected]> wrote:

> On Mon, Jul 5, 2010 at 4:49 PM, Peng Yu <[email protected]> wrote:
> > I'm pretty sure that I can collapse multiple exclude patterns into one
> > in a previous version of tar. Did tar get changed in the last a few
> > years on this aspect?
>
> I suspect what had happend is that your shell had interpreted the
> {..,..} during word expansion:
>   --exclude=*.o --exclude=.*.sw? --exclude=.*.d
> but not expanded teh wildcards, because nothing matched those glob
> expressions.  I'm assuming you meant to use glob expressions -- that
> is, .*.sw? will match
>   .foo.swf
>   .bar.swx
> but not
>   foo.swf
>   foo.sw
>
> The problem is, if you're in a directory where the shell finds files
> that match the globs, then it expands them all the way, so you get
>   --exclude=foo.o --exclude=.foo.swf --exclude=.foo.d

If your shell behaves this way, it is time to replace it by a working shell.

Jörg

-- 
 EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
       [email protected]                (uni)  
       [email protected] (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily

Reply via email to