![Cisco ASR 9000 Serie Скачать руководство пользователя страница 202](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679202.webp)
Set _cerrno
None
This Tcl command extension blocks waiting for the specified pattern to show up in the contents read.
Note
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
Set _cerrno
None
Sample Usage
As an example, use configuration CLI commands to bring up Ethernet interface 1/0:
if [catch {cli_open} result] {
puts stderr $result
exit 1
} else {
array set cli1 $result
}
if [catch {cli_exec $cli1(fd) "config t"} result] {
puts stderr $result
exit 1
}
if [catch {cli_exec $cli1(fd) "interface Ethernet1/0"} result] {
puts stderr $result
exit 1
}
if [catch {cli_exec $cli1(fd) "no shut"} result] {
puts stderr $result
exit 1
}
if [catch {cli_exec $cli1(fd) "end"} result] {
puts stderr $result
exit 1
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
186
Configuring and Managing Embedded Event Manager Policies
CLI Library Command Extensions