The reason you can't use a variable is that the script ends, and so the 
command environment (bash) clears up the memory. It's just like you were 
running
./myscript
it finishes and then you run it again... old variable values are lost. 
You have to store the variables somewhere persistent, that could be a 
simple text file for bash, or you could use python for instance and use 
pickle files etc...
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University



feldman wrote, On 1/23/2009 5:04 AM:
> OK, what I don't understand is the following :
> 
> I've created a template command:
> usr/local/zenoss/common/libexec/check_http -H xxx.net 
> -u /test/test
> 
> I have also created a data source called size that point to the file size 
> returned by the zencommand, and a graph that displays the size in time. 
> 
> What I can't do is use the "size" variable in thescript for 
> checking/storing/printing..
> 
> I used the following (size, $size, rootWebCheck_size, $rootWebCheck_size) but 
> none of them is working.
> 
> I don't work in a script, I writed it all in the "Command Template" form...
> 
> 
> Thanks for your help
> 
> 
> 
> 
> -------------------- m2f --------------------
> 
> Read this topic online here:
> http://forums.zenoss.com/viewtopic.php?p=30411#30411
> 
> -------------------- m2f --------------------
> 
> 
> 
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to