From owner-freebsd-questions@FreeBSD.ORG Fri Dec 1 15:05:35 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 93F6C16A540 for ; Fri, 1 Dec 2006 15:05:35 +0000 (UTC) (envelope-from rastill@shaw.ca) Received: from pd5mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A737743CA5 for ; Fri, 1 Dec 2006 15:05:20 +0000 (GMT) (envelope-from rastill@shaw.ca) Received: from pd2mr6so.prod.shaw.ca (pd2mr6so-qfe3.prod.shaw.ca [10.0.141.9]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0J9L0074BOITCN70@l-daemon> for freebsd-questions@freebsd.org; Fri, 01 Dec 2006 08:04:05 -0700 (MST) Received: from pn2ml4so.prod.shaw.ca ([10.0.121.148]) by pd2mr6so.prod.shaw.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0J9L00NEYOIS2F82@pd2mr6so.prod.shaw.ca> for freebsd-questions@freebsd.org; Fri, 01 Dec 2006 08:04:05 -0700 (MST) Received: from New ([70.65.134.12]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with SMTP id <0J9L00IE4OISB9O0@l-daemon> for freebsd-questions@freebsd.org; Fri, 01 Dec 2006 08:04:04 -0700 (MST) Date: Fri, 01 Dec 2006 08:04:07 -0700 From: Ray Still To: freebsd-questions@freebsd.org Message-id: <004601c71559$f2d645f0$6700a8c0@New> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=response Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal Subject: Fw: Re: problem with script execution X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 15:05:35 -0000 sorry, I hit reply, not reply all > > ----- Original Message ----- > From: "Christian Walther" > To: "Ray Still" > Cc: > Sent: Friday, December 01, 2006 1:03 AM > Subject: Re: problem with script execution > > >> Try adding "#!/bin/sh" as the first new line of your script. Roughly >> speaking: This makes the system use /bin/sh as the shell that executes >> the script. >> Specifying a PATH inside the script might help, too. Scripts have a >> very small environment set by default, so your PATH might be just >> something like /bin:/usr/bin. If sudo is in /usr/local/bin it won't >> work. >> > thank you for your suggestions. I will try them and get bck to you. > >> >> Just out of curiosity: What is the "echo * |" supposed to do? From my >> point of view the shell will expand "*" to the list of files and >> directories in PWD, so "echo *" acts like a simple ls in this context. >> This list is piped to sudo. But what does sudo do with these? > > sorry, I didn't want to show my passwords, so I replaced it with an > astrix. the password of course is being read from the pipe by sudo because > of the -S option. > >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.430 / Virus Database: 268.15.2/559 - Release Date: >> 11/30/2006 5:07 AM >> >> >