Next: Processing the tool output, Previous: Querying switches interactively, Up: Executing external tools

##### 16.6.4.5 Redirecting the command output

The output of external commands is send by default to the GPS console window. In addition, finer control can be exercised using the `output` attribute of the `<external>` and `<shell>` tags.

This attribute is a string that may take any value. Two values have specific meanings:

`"none"`
  The output of the command, as well as the text of the command itself, will not be shown to the user at all.
`""`
  The output of the command is sent to the GPS console window, entitled "Messages".
`other values`
  A new window is created, with the title given by the attribute. If such a window already exists, it is cleared up before any of the command in the chain is executed. The output of the command, as well as the text of the command itself, are sent to this new window.

This attribute can also be specified at the `<action>` tag level, in which case it defines the default value for all `<shell>` and `<external>` tags underneath. If it isn't specified for the action itself, its default value will always be the empty string, i.e. output is sent to the GPS console.

         <?xml version="1.0" ?>
         <ls>
           <action name="ls current directory" output="default output" >
              <shell output="Current directory" >pwd</shell>
              <external output="Current directory contents" >/bin/ls</external>
           </action>
         </ls>