How to use UNIX Command Substitution in a Global Variable
search cancel

How to use UNIX Command Substitution in a Global Variable

book

Article ID: 14596

calendar_today

Updated On:

Products

CA Workload Automation AE - Scheduler (AutoSys)

Issue/Introduction

How can you set a Global Variable with UNIX command substitution so that the actual command substitution is stored as the value rather than the result of the command substitution?

Environment

Workload Automation AE

Resolution

If you are setting the global variable in WCC via Quick Edit, there is nothing special that would need to be done.

 

Just set the value to `<command>`. However, if you are setting the global variable using the sendevent command, you will need to escape the backticks. For example...

sendevent -E SET_GLOBAL -G "<VAR_NAME>=\`<command>\`"