This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: "find -exec broken"??
Duh!!
I was just missign the "\" befor the ";", so it didn't work. The docs
(man find) _do_ say something about the (pssible) need to escape the {}
for the command to run, but it isn't so clear about the ";" - of course
thinking a little about it, I guess the shell was taking the ; as a
command separator, and executing both commands, "find" and "null"...
that's the reason for the unhelpful :
public_html> find . -type d -maxdepth 1 -exec echo {} ;
find: missing argument to `-exec'
it was missing the ending ;
en> find . -type d -maxdepth 1 -exec echo {} ;
find: missing argument to `-exec'
but anything after the ; was executed:
en> find . -type d -maxdepth 1 -exec echo {} ; ls
find: missing argument to `-exec'
SCCS/ index.en.html* to_do.en.html*
and once I escaped the ";", all went well:
en> find . -type d -maxdepth 1 -exec echo {} \;
--
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/