bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Excluding directories based on content


From: Eric Blake
Subject: Re: [Bug-tar] Excluding directories based on content
Date: Sun, 19 Nov 2006 13:00:04 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Joerg Schilling on 11/19/2006 12:37 PM:
>   
>>> find . -type d -exec echo {}/FILENAME \;
>>>
>>> will print a "{}/FILENAME" for each directory.
>> The `echo' command has nothing to do with our question.
> 
> It seems that you did not understand the problem:
> 
> find expands "{}" only if an argument is containing only the two characters 
> "{}".

Or, worded a little nicer, POSIX states that it is implementation-defined
how find behaves when -exec is handed an argument containing more than
just {}.  In other words, the above example is exploiting a non-portable
implementation-specific behavior, but it is not wrong to do that, unless
you care about portability to other platforms.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYLfD84KuGfSFAYARAsWtAJ9NB6kO7vBBbsklj9p6KGS+tSB1OgCfYC5Q
E3Hm9vtH1Gq3OLodp2odNf0=
=X53N
-----END PGP SIGNATURE-----




reply via email to

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