Syntax
cli_run clist
Arguments
(Mandatory) The list of commands to be executed.
clist
Result String
Output of all the commands that are executed or an error message.
Set _cerrno
None.
Sample Usage
The following example shows how to use the
cli_run
command extension.
set clist [list {sh run} {sh ver} {sh event man pol reg}]
cli_run { clist }
cli_run_interactive
Provides a sublist to the clist which has three items. On success, returns the output of all executed commands
and on failure, returns error from the failure. Also uses arrays when possible as a way of making things easier
to read later by keeping expect and reply separated.
Syntax
cli_run_interactive
clist
Arguments
(Mandatory) List of three items:
•
command
–
Command to be executed
•
expect
–
A regular expression pattern match for the expected reply
prompt
•
responses
–
A list of possible responses to the reply prompt
constructed as an array of two items:
•
expect
–
A regular expression pattern match for a possible reply
prompt
•
reply- A reply for that expected prompt
clist
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1855
cli_run_interactive
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......