Update of bug #50780 (project findutils):
Status: None => Invalid
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
And that behavior of -printf is expected. It is comparable to the POSIX
behavior of -print.
The '-printf' expression (like POSIX -print) will print the file name being
visited, then return true.
The '-type f' expression will check whether the file being visited as a
regular file, and return true or false accordingly.
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 -printf 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 -printf second, it only executes on the files that got past the
-type filter.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50780>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/