From owner-freebsd-questions Mon Jul 3 23:44:16 2000 Delivered-To: freebsd-questions@freebsd.org Received: from penguin.prod.itd.earthlink.net (penguin.prod.itd.earthlink.net [207.217.120.134]) by hub.freebsd.org (Postfix) with ESMTP id 4CB7037BBA1 for ; Mon, 3 Jul 2000 23:44:12 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from dialin-client.earthlink.net (pool0514.cvx20-bradley.dialup.earthlink.net [209.179.252.4]) by penguin.prod.itd.earthlink.net (8.9.3-EL_1_3/8.9.3) with ESMTP id XAA18338; Mon, 3 Jul 2000 23:43:38 -0700 (PDT) Received: (from cjc@localhost) by dialin-client.earthlink.net (8.9.3/8.9.3) id XAA00830; Mon, 3 Jul 2000 23:41:47 -0700 (PDT) Date: Mon, 3 Jul 2000 23:41:22 -0700 From: "Crist J. Clark" To: Christoph Sold Cc: Alan Clegg , Christoph Sold , FreeBSD-Questions@FreeBSD.ORG Subject: Re: find -exec Problem Message-ID: <20000703234121.B679@dialin-client.earthlink.net> Reply-To: cjclark@alum.mit.edu References: <3960FC7A.4217804D@i-clue.de> <20000703165333.F42727@shell.wetworks.org> <3960FEA2.FD01F3DE@i-clue.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <3960FEA2.FD01F3DE@i-clue.de>; from so@server.i-clue.de on Mon, Jul 03, 2000 at 10:59:14PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Jul 03, 2000 at 10:59:14PM +0200, Christoph Sold wrote: > > > Alan Clegg wrote: > > > > An SMTP stream claimed that I muttered: > > > > > # find . -type d -print -exec 'chmod o+rx {}'; > > > find: -exec: no terminating ";" > > > > > > To me, this command look like it is in sync wiht it's manpage. What am I > > > doing wrong here? > > > > Add a \ before the ; > > > > ie: > > > > find . -type d -print -exec 'chmod o+rx {}' \; > > Nope. Problem remains. Yeah I'm running bash here. The arguments of the -exec are loaded up to be exec(3)ed (don't have source on this machine to look up exactly how find(1) works). If you escape it like that, the whole works is seen by the shell as one word and passed on as the command name. I get responses like, . find: chmod o+rx .: No such file or directory If I try to run that. What is currious is that the '{}' substitution still happens. I think I'll have to look at source for this one. Curious. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message