Viewing action Scripts

You can view an action script from the IBM BigFix Console by selecting a Fixlet or Task and clicking on the Details tab. For more information on the action syntax, see the IBM BigFix Action Language Reference.

In many of the action scripts, you can see Relevance expressions inside of curly brackets {}. When the action is executed, these expressions are evaluated on each client computer and the results are substituted into the action script. This allows an author to create actions that are custom-tailored for each client. For instance:

run "{pathname of regapp "excel.exe"}"

This example can run a program without knowing where it is located. The bracketed relevance expression evaluates the pathname automatically using the regapp inspector. Embedding Relevance expressions lets you execute precisely targeted action scripts. This script might use a different pathname on every client, but still operate as intended. This allows you to write readable, compact scripts that will automatically customize themselves to each client on your network.

As well as substituting variables, you can use Relevance expressions to make assertions that can alter the flow of the code:

pause while {exists running application "c:\updater.exe"}

This action pauses until a program finishes executing, using the running application inspector.

Substitution is not recursive, although any particular command may have one or more expressions to evaluate before execution. The IBM BigFix application is expecting to find a single expression inside the curly braces. If it sees another left brace before it encounters a closing right brace, it treats it as an ordinary character:

echo {"a left brace: {"}

would send this string to output:

a left brace: {

Therefore no special escape characters are necessary to represent a left brace. To output a literal right brace without ending the substitution, use a double character:

echo {"{a string inside braces}}"}

would send this string to output:

{a string inside braces}

Or consider this example:

appendfile {{ name of operating system } {name of operating system} 

When this example is parsed, the double left braces indicate that what follows is not a relevance expression. Therefore, this part of the script is treated as a string, up to the first right brace. The third left brace indicates the actual start of a Relevance expression. This outputs the following line to __appendfile:

{ name of operating system } WinXP