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: