bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

find -ok ... and reading from stdin


From: James Youngman
Subject: find -ok ... and reading from stdin
Date: Sun, 17 Jul 2005 22:13:58 +0100
User-agent: Mutt/1.5.9i

The "-ok command ... {} \;" action of find asks the user if they want
to run the command, but it otherwise almost exactly like -exec.  When
the command is run, should its standard input be attached to the same
file as find's standard input (e.g. the input file or pipe from 'yes'
for example) or should it just have its input pointed at /dev/null?

Advantages of leaving it as-is
        - ability to launch an interactive program with -ok.

Advantages of redictecting stdin from /dev/null
        - the executed program can't steal input that the user might have 
          expected to be read by the "-ok" action.

See also http://savannah.gnu.org/bugs/?func=detailitem&item_id=13650

Preferences?  Comments?

Regards,
James.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]