Re: [Nagios-devel] Re: [Nagios-users] $OUTPUT$ as shell script parameter
Posted: Wed Sep 15, 2004 10:20 am
Jason Martin wrote:
> On Wed, Sep 15, 2004 at 08:52:16AM +0800, [email protected] 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 [email protected]
OP5 AB www.op5.se
Lead Developer
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> On Wed, Sep 15, 2004 at 08:52:16AM +0800, [email protected] 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 [email protected]
OP5 AB www.op5.se
Lead Developer
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]