Follow-up Comment #7, bug #13650 (project findutils):
i understand, but that's not how -ok works. OK is like -exec, it doesn;t just
ask it actually runs the command. Hence the nearest thing to what you're
talking about that would actually work is
find ... -ok true {} \; -a -exec rm -i {} \;
As you point out, this would ask twice. Given the current code, the "true"
command would not be able to read from stdin, but doesn;t try, while the "rm
-i" command would be able to read from stdin. So, what you wanted already
works.
If you were doing this for real though, this is probably better, but only asks
once:
find ... -ok rm {} \;
This is neater, but asks only once, since "rm" would not be able to read from
stdin.
_______________________________________________________
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