Fw: Re: problem with script execution

Ray Still rastill at shaw.ca
Fri Dec 1 07:05:35 PST 2006


sorry, I hit reply, not reply all
>
> ----- Original Message ----- 
> From: "Christian Walther" <cptsalek at gmail.com>
> To: "Ray Still" <rastill at shaw.ca>
> Cc: <freebsd-questions at 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
>>
>>
> 



More information about the freebsd-questions mailing list