Date: Fri, 01 Dec 2006 08:04:07 -0700 From: Ray Still <rastill@shaw.ca> To: freebsd-questions@freebsd.org Subject: Fw: Re: problem with script execution Message-ID: <004601c71559$f2d645f0$6700a8c0@New>
next in thread | raw e-mail | index | archive | help
sorry, I hit reply, not reply all > > ----- Original Message ----- > From: "Christian Walther" <cptsalek@gmail.com> > To: "Ray Still" <rastill@shaw.ca> > Cc: <freebsd-questions@freebsd.org> > 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 >> >> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004601c71559$f2d645f0$6700a8c0>