[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] How to exclude multiple patterns?
From: |
Joerg Schilling |
Subject: |
Re: [Bug-tar] How to exclude multiple patterns? |
Date: |
Tue, 06 Jul 2010 10:37:11 +0200 |
User-agent: |
nail 11.22 3/20/05 |
"Dustin J. Mitchell" <address@hidden> wrote:
> On Mon, Jul 5, 2010 at 4:49 PM, Peng Yu <address@hidden> 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:address@hidden (home) Jörg Schilling D-13353 Berlin
address@hidden (uni)
address@hidden (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily