[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #50835] -print0 causes all files to be output
From: |
Eric Blake |
Subject: |
[bug #50835] -print0 causes all files to be output |
Date: |
Thu, 20 Apr 2017 14:19:49 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Update of bug #50835 (project findutils):
Item Group: Wrong result => None
Status: None => Duplicate
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Your complaint is the same as in bug 50780. Quoting from my response there,
with a tweak of -printf changed to -print0:
When two expressions are written as 'A B', find behaves if you had instead
written 'A -a B'. The -a operator is short-circuiting: if expression A returns
false, expression B is not attempted; but if expression A returns true, then
expression B is used.
When you write -print0 first, it always executes (everything gets printed),
then you filter out the files, but do nothing further with the files you
filtered.
When you write -print0 second, it only executes on the files that got past the
-type filter.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50835>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/