escaping semicolon

Ethan Galstad nagios at nagios.org
Thu Jul 13 23:22:03 CEST 2006


Nathan Vonnahme wrote:
> Gerd Mueller <gmueller <at> netways.de> writes:
> 
>> My workaround will be a simple bash script which replaces another
>> character with a semicolon but I really do not like this workaround! I
>> would prefer if it is possible to escape the semicolon.
> 
> I discovered a different workaround for semicolons in command_line directives:
> 
> in resource.cfg:
> $USER9$=;
> 
> then in the command definition I can use:
> 	command_line	$USER1$/contrib/check_oracle_instance.pl -ufoo -pbar
> -c"host=host_foo$USER9$sid=oracle_sid_foo" -a
> 
> (incidently, that's a neat trick for making the check_oracle_instance.pl script
> monitor a database on another machine... you could change the port too with
> $USER9$port=1521).
> 
> 
> but I agree, there should be a better way of escaping semicolons in
> command_lines, and there should be something in the documentation for
> command_line.   Maybe this patch to the docs would be a good temporary measure:
> 
> --- xodtemplate.html.dist       2006-07-12 11:24:07.000000000 -0800
> +++ xodtemplate.html    2006-07-12 11:37:14.000000000 -0800
> @@ -1112,6 +1112,8 @@
>  <p>
[snip]

An excellent trick indeed!  I'll add this info to the docs as you suggested.


Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list