- Table of Contents
-
- 01-Fundamentals Command Reference
- 00-Preface
- 01-CLI commands
- 02-Login management commands
- 03-RBAC commands
- 04-FTP and TFTP commands
- 05-File system management commands
- 06-Configuration file management commands
- 07-Software upgrade commands
- 08-ISSU commands
- 09-Emergency shell commands
- 10-Device management commands
- 11-Tcl commands
- 12-Python commands
- 13-License management commands
- 14-Preprovisioning commands
- Related Documents
-
Title | Size | Download |
---|---|---|
11-Tcl commands | 40.25 KB |
Tcl commands
cli
Use cli to execute Comware commands in Tcl configuration view.
Syntax
cli command
Views
Tcl configuration view
Predefined user roles
network-admin
Parameters
command: Specifies the commands to be executed. They must be complete command lines.
Usage guidelines
In Tcl configuration view, a Tcl command takes preference over a Comware command when a conflict occurs. This command enables a Comware command to be executed when a conflict occurs.
This command cannot be used to execute Tcl commands.
Examples
# Execute a Comware command that conflicts with a Tcl command. The output shows that the Comware command cannot be executed.
<Sysname> tclsh
<Sysname-tcl> system-view
[Sysname-tcl] user-interface vty 0 63
[Sysname-tcl-line-vty0-63] set authentication password simple password1
wrong # args: should be "set varName ?newValue?"
# Configure the cli command to execute the Comware command again. The output shows that the Comware command can be executed successfully.
[Sysname-tcl-line-vty0-63] cli set authentication password simple password1
# Execute multiple Comware commands in one operation to enter OSPF area view.
Method 1:
[Sysname-tcl] cli "ospf 100 ; area 0"
[Sysname-tcl-ospf-100-area-0.0.0.0]
Method 2:
[Sysname-tcl] cli ospf 100 ; cli area 0
[Sysname-tcl-ospf-100-area-0.0.0.0]
tclquit
Use tclquit to return from Tcl configuration view to user view.
Syntax
tclquit
Views
Tcl configuration view
Predefined user roles
network-admin
Usage guidelines
To return from Tcl configuration view to user view, you can also use the quit command.
To return to the upper-level view from system view or a Comware feature view, use the quit command.
Examples
# Return from Tcl configuration view to user view.
<Sysname-tcl> tclquit
<Sysname>
Related commands
tclsh
tclsh
Use tclsh to enter Tcl configuration view from user view.
Syntax
tclsh
Views
User view
Predefined user roles
network-admin
Usage guidelines
In Tcl configuration view, you can execute the following commands:
· All Tcl 8.5 commands.
· Comware commands. The Tcl configuration view is equivalent to the user view. You can use Comware commands in Tcl configuration view in the same way they are used in user view.
Examples
# Enter Tcl configuration view from user view.
<Sysname> tclsh
<Sysname-tcl>
Related commands
tclquit