Sends the captured output to filename. The file must be a writable Tcl file descriptor.
The CLI command (or commands) whose output is being captured. If you specify more than one command, you must enclose them within braces (
{ }).
The capture command executes
command, capturing in a string all output that would normally go to the console. After
command completes, it returns the string. This command is analogous to the UNIX shell’s back-tick feature (
`command`). The
capture command obtains the printed output of any CLI command so that you can assign it to a variable or otherwise manipulate it.
Because the capture command records all information sent to it by the commands in the
foreach loop, you do not have to use a
dlist command.
Also writes the help text for all CLI commands to the cli_help.txt file. This set of commands is more efficient than the previous command because the captured data is not buffered.