Table of Contents

Search

  1. Preface
  2. Workflows
  3. Workflow Variables
  4. Workflow Parameters
  5. Cluster Tasks
  6. Command Task
  7. Human Task
  8. Mapping Task
  9. Notification Task
  10. Gateways
  11. Workflow Recovery
  12. Workflow Administration

Developer Workflow Guide

Developer Workflow Guide

Escape Characters in Command Tasks

Escape Characters in Command Tasks

Use a Command task to write the output of a command to a file. If the command output includes a variable name, use a backslash as an escape character to add the $ character before the variable name.
When you configure the Command task to run on a non-Windows operating system, use three backslashes. The first backslash is an escape character for the second backslash. The third backslash is an escape character for the $ character.
For example, you define the following command in the Command task:
echo \\\${var:myVariable} = ${var: myVariable} > file.txt
If the variable has a value of 10 when the workflow runs, the Command task writes the following string to file.txt:
${var:Var} = 10

0 COMMENTS

We’d like to hear from you!