[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #33459] Find -exec not working correctly with binary matching
From: |
Eric Blake |
Subject: |
[bug #33459] Find -exec not working correctly with binary matching |
Date: |
Thu, 02 Jun 2011 00:01:33 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.6.17-1.fc14 Firefox/3.6.17 |
Follow-up Comment #2, bug #33459 (project findutils):
find . -name test1 -or -name test2 -exec echo {} ;
find . -name test1 -or -name test2 -print
are identical to:
find . -name test1 -or ( -name test2 -exec echo {} ; )
find . -name test1 -or ( -name test2 -print )
while
find . -name test1 -or -name test2
is identical to:
find . ( -name test1 -or -name test2 ) -print
Notice that the absence of -print or -exec results in implicit () around the
rest of the expressions.
but the first 2 commands give the following output
./test2
the last command outputs properly with
./test1
./test2
In all three commands, the results you saw are correct. I think the only bug
here is that you misunderstood how the implicit -print also implies (), which
changes precedence on the rest of the line.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33459>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/