This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: problem with find -exec
- From: "Schaible, Jörg" <Joerg dot Schaible at gft dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 23 Apr 2002 12:52:11 +0200
- Subject: RE: problem with find -exec
Hi Mike,
>find . -xdev -exec 'grep -l -F "string" {}';
>I'd be grateful if anyone can see what I'm doing wrong,
excerpt from the man page:
-exec command ;
Execute command; true if 0 status is returned. All following
arguments
to find are taken to be arguments to the command until an
argument con-
sisting of `;' is encountered. The string `{}' is replaced
by the cur-
rent file name being processed everywhere it occurs in the
arguments to
the command, not just in arguments where it is alone, as in
some ver-
sions of find. Both of these constructions might need to
be escaped
(with a `\') or quoted to protect them from expansion by the
shell. The
command is executed in the starting directory.
1. There is a space before the semicolon which *is* significant
2. Escape the semicolon
Regards,
Jörg
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/