"Sergey Poznyakoff" <[EMAIL PROTECTED]> wrote:

> Joerg Schilling <[EMAIL PROTECTED]> wrote:
>
> > >   find . -type d -exec test -r {}/FILENAME \; -prune -o -print |
> > >      tar --no-recursion -cf archive.tar -T -
> > 
> > This does not work.....
>
> It works for me. -exec returns true or false regarding on whether
> FILENAME is present in the directory, and -prune makes find to not
> descend into that directory.

Then it seems that the program you call "find" is not strictly following the 
POSIX
standard and your command line depends on unspecified behavior of a specific
find implementation.

  
> > 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 
"{}".

echo allows you to check for the behavior of find.

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/old/private/ ftp://ftp.berlios.de/pub/schily


Reply via email to