[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find . -path '*/.gork' -prune -o -type f : prints ".gork"
From: |
David M. Karr |
Subject: |
Re: find . -path '*/.gork' -prune -o -type f : prints ".gork" |
Date: |
09 Nov 2000 10:30:25 -0800 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6 |
>>>>> "Andreas" == Andreas Schwab <address@hidden> writes:
Andreas> address@hidden (David M. Karr) writes:
Andreas> |> Bob> find . -path '*/.gork' -prune -o -type f -print
Andreas> |>
Andreas> |> This is really strange. As you describe, without the "-print" on
the
Andreas> |> end, it prints the directory name I wanted to skip. With
"-print" on
Andreas> |> the end, it doesn't print that directory. That's the behavior
that I
Andreas> |> want. Is it possible to explain WHY it works this way without
Andreas> |> confusing me even more?
Andreas> Note that `find . -path '*/.gork' -prune -o -type f' is equivalent to
Andreas> `find . \( -path '*/.gork' -prune -o -type f \) -print', ie, -print
is
Andreas> added at the outer level; but `-o' binds lower than `-a', thus in the
Andreas> second case you have `find . -path '*/.gork' -prune -o \( -type f
-print \)'.
Another reason why no one else in my company is crazy enough to try to
understand "find" syntax :) .
Thanks for the explanation. You could never convince me that the way
this works is "logical".
--
===============================================================================
David M. Karr ; address@hidden ; w:(425)487-8312 ; TCSI & Best Consulting
Software Engineer ; Unix/Java/C++/X ; BrainBench CJ12P (#12004)