-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to [EMAIL PROTECTED] on 10/13/2008 1:14 PM: > Regarding "-ok": if you want to type y but by mistake you type > anything else, you have to start all over again. Therefore there > should also be a "p" offered: "bring me back to the previous line > and ask me again".
Sorry, but POSIX doesn't permit this. http://www.opengroup.org/onlinepubs/009695399/utilities/find.html > > Please add to this the reason why standard input is redirected from > /dev/null vs. -exec. (Otherwise seems just for spite.) Hmmm. POSIX doesn't mention that -ok should redirect stdin; on the other hand, it doesn't seem to explicitly forbid it. The redirection is done so that reading your response doesn't interfere with the child processes trying to read from stdin (if either one reads more bytes than strictly necessary, then you've lost input data and put the next reader out of sync). > > Also mention if one then indeed needs stdin, a workaround is > -ok true \; -exec, e.g., > -ok true \; -exec ed {} \; > -ok true \; -exec mplayer {} \; > > Also it seems an -ok + and -okdir + could be implemented just as there > now is -exec + and -execdir +. POSIX explicitly allows the omission of -ok +. Besides, what semantics would you give it? Is it an all-or-none action on the directory? If you still end up asking once per file, then what good did it do? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjz/rAACgkQ84KuGfSFAYDAJQCfQmKRB9oAncuWhsPkQXAsYPRs YR0AoNJE9WhrUtgQxtygl9SZDVM18lIi =D2Hb -----END PGP SIGNATURE-----
