%ECHO--Print To Output

Display the value of a variable in the Agent's namespace.


 %ECHO string


stringstring, including namespace variable macros to be resolved, which will be returned by the %ECHO command.


%ECHO displays the string parameter, after macros of namespace variables have been substituted.

Namespace variable macros take the following form:

% variable 

The value of variable will be substituted for the macro before displaying the string.

If variable is a relative name and does not exist in the context of executing the %ECHO command, the command successively searches each ancestor's context until variable is found or until the search fails in the context of the computer.

Unlike the PSL get() function, that returns null when a variable is not found, %ECHO will trigger a user error message if the macro cannot be substituted, and string will be displayed without substituting the unknown variable.

For example, the command %ECHO Version %{/patrolVersion} of the PATROL Agent displays the following:

Version 3.6.50i of the PATROL Agent

If the variable unknown does not exist, the command %ECHO Value: %{ unknown } triggers a user error and displays the following:

Value: %{ unknown }

Where to go from here

PSL External Commands

Was this page helpful? Yes No Submitting... Thank you