Follow-up Comment #5, bug #13650 (project findutils):
One potential problem here is that if a prepared file is being fed to find on
stdin, the command executed by -ok can steal its input. That's why the
current findutils code runs programs for "-ok" with stdin redicrected from
/dev/nul, but still runs programs for "-exec" with stdin unchanged.
In the example you give I assume you're changing the -o in the example to
-a:
find a b c -mtime 2 -ok prog1 {} \; -a -exec rm -i {} \;
That is, if "prog1" returns 0, rm -i will be called on the file currently
being considered. That will work with the (now) current development code. If
that's what you're asking for, no problem, that's what we have right now. Or
are you asking for something else?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13650>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils