[Nagios-users] $OUTPUT$ as shell script parameter

Andreas Ericsson ae at op5.se
Wed Sep 15 20:20:23 CEST 2004


Jason Martin wrote:
> On Wed, Sep 15, 2004 at 08:52:16AM +0800, nagios at mm.quex.org wrote:
>>Has there be any thought toward making the macro values available
>>via environment variables?  This would be good for commands that want
>>to be "intelligent" and have access to all the available information
>>(for which writing the commands out and parsing all the arguments is a
>>bit tedious), and also solves the problem of having to strip certain
>>characters from command output and user comments for fear of
>>inadvertently executing them.
> 
> Now that is an interesting idea; are there any limits on the
> length of an environmental variable that would interfere? Does
> it work the same way across platforms?
> 

Nopes. Functions in shell-scripts are memory-wise treated the same as 
variables. I'm not sure if there's an upper limit, but if there is, it's 
at least beyond 64KB and should thus suffice to hold any macro.

> -Jason Martin

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m




More information about the Developers mailing list