Date: Fri, 1 Dec 2006 09:03:20 +0100 From: "Christian Walther" <cptsalek@gmail.com> To: "Ray Still" <rastill@shaw.ca> Cc: freebsd-questions@freebsd.org Subject: Re: problem with script execution Message-ID: <14989d6e0612010003o43774f27p5228c34b02c839ae@mail.gmail.com> In-Reply-To: <039401c71517$b9ef5750$6700a8c0@New> References: <039401c71517$b9ef5750$6700a8c0@New>
next in thread | previous in thread | raw e-mail | index | archive | help
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. 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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14989d6e0612010003o43774f27p5228c34b02c839ae>