EasyManua.ls Logo

Cisco Catalyst 2960 Series

Cisco Catalyst 2960 Series
2288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Result String
Output of all the commands that are executed or an error message. As each command is executed its output
is appended to a result variable. Upon exhaustion of the input list, the CLI channel is closed and the aggregate
result is returned.
Set _cerrno
None.
Sample Usage
The following example shows how to clear counters for interface fa0/0 use the cli_run_ interactive command
extension.
set cmdarr(command) "clear counters fa0/0"
set cmdarr(responses) [list]
set resps(expect) {[confirm]}
set resps(reply) "y"
lappend cmdarr(responses) [array get resps]
set rc [catch {cli_run_interactive [list [array get cmdarr]]} result]
Possible errors raised include:
cannot get pty for exec
cannot spawn exec
error reading the first prompt
error reading the channel
cannot close channel
cli_write
Writes the command that is to be executed to the specified CLI channel handler. The CLI channel handler
executes the command.
Syntax
cli_write fd cmd
Arguments
(Mandatory) The CLI channel handler.fd
(Mandatory) The CLI command to execute.cmd
Result String
None
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1856
cli_write

Table of Contents

Other manuals for Cisco Catalyst 2960 Series

Related product manuals