Run an operating system command or start an application as child process. A user-specified OSRedirect object or a default system variable ($$stdout) automatically captures child process output.
The command has the following syntax:
!! cmd [-output osRedirect]
Command to execute or application to run. Multiple commands can be concatenated using a && sequence. Unquoted argument tokens are automatically stringified. Prevent automatic quoting for expressions by placing expression code in parenthesis.
(Optional) Existing OSRedirect object to receive the output of the child process and capture it in the specified variable.
Default: $$stdout
Examples
Get DOS memory information about Windows OS with output redirected to a variable, out, that is not initialized before the call:
!! mem -output out // Output line by line aLines = out.output().split(String.fromCharCode(10)); arrdump aLines
Perform a DNS lookup and automatically capture the output to $$stdout:
!! nslookup ca.com ? $$stdout.output()
Copyright © 2013 CA. All rights reserved. |
|