[Cook] Passing Environment variables to scripts ?
Daniel O'Connor
darius at dons.net.au
Fri Oct 1 12:23:54 EST 2004
On Fri, 1 Oct 2004 10:47, John Darrington wrote:
> I've got a function which calls a shell script like:
>
> function run-script =
> {
> [ print Running Script [ @1 ] ] ;
> [shell [@1]];
> }
>
> but I want the script to be called with certain environment variables
> set. How can I do this? I've tried numerous things similar to:
>
>
> function run-script =
> {
> [ print Running Script [ @1 ] ] ;
> [shell FOO=xyzzy [@1]];
> }
>
> But none of them seem to do the business. Maybe cook should have a
> setenv function to complement its getenv ?
Try using env, eg..
env FOO=bar xyz
ISTR cook doesn't use a shell to run commands so FOO= won't work.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20041001/b0a68d04/attachment.pgp>
More information about the Cook-users
mailing list