- Table of Contents
-
- 01 Fundamentals Configuration Guide
- 00-Preface
- 01-CLI configuration
- 02-Login management configuration
- 03-RBAC configuration
- 04-FTP and TFTP configuration
- 05-File system management configuration
- 06-Configuration file management configuration
- 07-Software upgrade configuration
- 08-ISSU configuration
- 09-Device management configuration
- 10-Tcl configuration
- 11-Python configuration
- 12-License management
- 13-Automatic configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
10-Tcl configuration | 60.13 KB |
Comware V7 provides a built-in tool command language (Tcl) interpreter. From user view, you can use the tclsh command to enter Tcl configuration view to execute the following commands:
· 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. For example, you can perform the following tasks:
¡ Use the system-view command to enter system view to configure features.
¡ Use the quit command to return to the upper-level view.
Using Tcl to configure the device
When you use Tcl to configure the device, follow these guidelines and restrictions:
· You can apply Tcl environment variables to Comware commands.
· No online help information is provided for Tcl commands.
· You cannot press Tab to complete an abbreviated Tcl command.
· Successfully executed Tcl commands are not saved to command history buffers.
· The tclquit command has the same effect as the quit command in Tcl configuration view.
· If you have used a Comware command to enter a subview under Tcl configuration view, you can only use the quit command, instead of the tclquit command to return to the upper level view.
To use Tcl to configure the device:
Task |
Command |
Enter Tcl configuration view from user view. |
tclsh |
Execute a Tcl command. |
Tcl command |
Return from Tcl configuration view to user view. |
tclquit |
Executing Comware commands in Tcl configuration view
Follow these restrictions and guidelines when you execute Comware commands in Tcl configuration view:
· For Comware commands, you can enter ? to obtain online help or press Tab to complete an abbreviated command. For more information, see "Using the CLI."
· The cli command is a Tcl command, so you cannot enter ? to obtain online help or press Tab to complete an abbreviated command.
· Successfully executed Comware commands are saved to command history buffers. You can use the upper arrow or lower arrow key to obtain executed commands.
· To execute multiple Comware commands in one operation:
¡ Enter multiple Comware commands separated by semi-colons to execute the commands in the order they are entered. For example, ospf 100;area 0.
¡ Specify multiple Comware commands for the cli command, quote them, and separate them by a space and a semicolon. For example, cli "ospf 100 ; area 0".
¡ Specify one Comware command for each cli command and separate them by a space and a semicolon. For example, cli ospf 100 ; cli area 0.
To execute Comware commands in Tcl configuration view:
Step |
Command |
Remarks |
1. Enter Tcl configuration view |
tclsh |
N/A |
2. Execute Comware commands directly. |
Use either method. If you execute a Comware command directly, a Tcl command is executed when the Tcl command conflicts with the Comware command. If you execute a Comware command by using the cli command, the Comware command is executed when it conflicts with a Tcl command. |