* RE: problem with find -exec
@ 2002-04-23 4:11 "Schaible, Jörg"
0 siblings, 0 replies; 3+ messages in thread
From: "Schaible, Jörg" @ 2002-04-23 4:11 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: problem with find -exec
@ 2002-04-23 9:18 "Schaible, Jörg"
0 siblings, 0 replies; 3+ messages in thread
From: "Schaible, Jörg" @ 2002-04-23 9:18 UTC (permalink / raw)
To: Davies, Mike; +Cc: cygwin-list
Hi Mike,
>Also I didn't understand that
>shell stomps
>the ; and also, also I didn't know that the space was required
Well, I know, because I'd once stumbled, too <g>.
>(the second
>line of the man page for find -exec doesn't have a space btw).
Uups. IIRC I *had* problems without the space.
>Thanks for your help,
Your welcome,
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* problem with find -exec
@ 2002-04-23 3:37 Davies, Mike
0 siblings, 0 replies; 3+ messages in thread
From: Davies, Mike @ 2002-04-23 3:37 UTC (permalink / raw)
To: cygwin
Hi,
I'm using Cyywin on Win 98 SE and I have a problem with the find command.
The command I am trying to run is :
find . -xdev -exec 'grep -l -F "string" {}';
This command works fine on another flavour of unix but under Cygwin it gives
me the error :
find: missing argument to `-exec'
I've tried simplifying the command in various ways to try and see what's
going wrong (including find . -exec 'ls'; and others) but they all give the
same missing argument error.
I'd be grateful if anyone can see what I'm doing wrong,
Thanks,
Mike Davies
Mike Davies
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-23 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23 4:11 problem with find -exec "Schaible, Jörg"
-- strict thread matches above, loose matches on Subject: below --
2002-04-23 9:18 "Schaible, Jörg"
2002-04-23 3:37 Davies, Mike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).