Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <1264BCF4F426D611B0B00050DA782A50111A95@mail.gft.com> From: =?iso-8859-1?Q?=22Schaible=2C_J=F6rg=22?= To: cygwin AT cygwin DOT com Subject: RE: problem with find -exec Date: Tue, 23 Apr 2002 12:52:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g3NBFVm23956 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/