RUN HOST COMMAND condition actions for Unix

Document ID : KB000088282
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Supplemental documentation for using RUN HOST COMMAND conditions on Unix.
 
Environment:
OS: Unix
Resolution:
The following information for Unix is meant to supplement the 'Selecting Condition Actions' --> 'Run HOST COMMAND' section of the Applications Manager documentation that can be found here:

https://docs.automic.com/documentation/webhelp/english/ALL/components/AM/latest/All%20Guides/help_en.htm#AM_Development_Guide/Selecting_Condition_Actions.htm%3FTocPath%3DDevelopment%2520Guide%7CWorking%2520with%2520Conditions%7CSelecting%2520Condition%2520Values%7C_____4

Within the action argument of the Run Host Command condition, Unix operating system commands can be chained together, separating commands using a semicolon (;). 

 
Example: echo “Header line” > outfile1; echo “Detail line” >> outfile1 
 
Prior to passing the command(s) specified within the action argument of the RUN HOST COMMAND condition to the host for execution, the following evaluations will occur: 
  • Dollar sign ($) characters will be removed unless the dollar sign is preceded by the tilde (~) character. 
Example: $test would evaluate to test 
Example: ~$test would evaluate to $test 
 
  • Pairs of percent sign (%) characters will be removed, starting from the left.
Example: date +%m%d would evaluate to date +md
Example: date +%m%d%y would evaluate to date +md%y 
Example: date +%Y would remain unchanged 
 
  • Curly braces { } will be removed and the contents between the curly braces will be evaluated as follows: 
Example: {#xxx} – evaluates to the value associated with the specified Application Manager Substitution variable.  
If #xxx substitution variable exists with the value of “xxx_subvar_value”, then {#xxx} would evaluate to xxx_subvar_value 
If #xxx substitution variable does NOT exist, then {#xxx} would evaluate to #xxx 
Example:  {xxx} – evaluates to the value associated with specified Application Manager Replacement Value. 
If xxx replacement value exists with the value of “xxx_replacement_value”, then {xxx} would evaluate to xxx_replacement_value 
If xxx replacement value does NOT exist, then {xxx} would evaluate to xxx