From owner-freebsd-questions Thu Mar 11 14:25:26 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id D0C2A15036 for ; Thu, 11 Mar 1999 14:25:18 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id RAA05090; Thu, 11 Mar 1999 17:24:34 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199903112224.RAA05090@cc942873-a.ewndsr1.nj.home.com> Subject: Re: find usage in shell script In-Reply-To: <36E82CF2.F47BE244@cyberia.com> from Glen Mann at "Mar 11, 99 03:52:02 pm" To: gmann@cyberia.com (Glen Mann) Date: Thu, 11 Mar 1999 17:24:34 -0500 (EST) Cc: questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Glen Mann wrote, > > Hello all- > > Can somebody explain why I can do this on the command line > > find ./data -type f -exec chown nobody {} \; \ > -exec chgrp nogroup {} \; \ > -exec chmod 664 {} \; > > But not in a Bourne shell script? No, I can't because I can run that in a sh-script. Works fine. > When I run the script with the backslashes > to break up the command to make it readable, I get this > > # ./fix_perms > find: : unknown option > -exec: not found > # > > Where is the second colon on the find: error line coming from? Do you happen to have a space-character behind one of those backslashes? Just a guess. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message