In sh, it is very common to use a syntax which looks like
var=`ls -l | grep mypattern`
echo $var
The fact of being able to replace a command within back quotes by its output is something I wanted to have
in kazimir, for making the construction of generic configuration files easier.
So I added this feature in kazimir. In any field in which you can use variables, you can use the syntax `cmd` in the same way. For example in a 'Action' tag you can write
Action: Nom = RespawnToto ; Path = /usr/bin/totod `date`;
In this example, this will start the toto service (not an actual one of course) with the current date as
argument. If this does not seem clear enough, try this syntax in one of your Kazimir's configuration file. I am
sure this will not stay fuzzy for long.
It is important to notice that the syntax with back quotes is authorized within 'Let' statement.
An example like this one is perfectly correct:
Variable: Name = x ; Default = `date`
Action: Nom = RespawnToto ; Path = /usr/bin/totod $(x); Let = { $(x) <- `date` ;}
And by doing this is this (perfectly stupid) example, you will start the totod service with the date of the last
re-spawn (contained in variable $(x) ).