- Table of Contents
-
- H3C S6116 Ultra-Low Latency Switch Series Configuration Guide-Release 671x-6W100
- 00-Preface
- 01-Interface forwarding configuration
- 02-CLI configuration
- 03-RBAC configuration
- 04-Login management configuration
- 05-FTP and TFTP configuration
- 06-File system management configuration
- 07-Configuration file management configuration
- 08-Software upgrade configuration
- 09-Device management configuration
- 10-Tcl configuration
- 11-Bulk interface configuration
- 12-IP addressing configuration
- 13-IPv6 basics configuration
- 14-Static routing configuration
- 15-IPv6 static routing configuration
- 16-AAA configuration
- 17-Public key management
- 18-SSH configuration
- 19-System maintenance and debugging configuration
- 20-NTP configuration
- 21-SNMP configuration
- 22-RMON configuration
- 23-Event MIB configuration
- 24-Information center configuration
- 25-PTP configuration
- 26-Network synchronization configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
10-Tcl configuration | 63.25 KB |
Restrictions and guidelines: Tcl
Using Tcl commands to configure the device
Executing Comware commands in Tcl configuration view
About executing Comware commands in Tcl configuration view
Using Tcl
About Tcl
Comware 7 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.
Restrictions and guidelines: Tcl
To return from a subview under Tcl configuration view to the upper-level view, use the quit command.
To return from a subview under Tcl configuration view to the Tcl configuration view, press Ctrl+Z.
Using Tcl commands to configure the device
Restrictions and guidelines
When you use Tcl to configure the device, follow these restrictions and guidelines:
· 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.
· Make sure the Tcl commands can be executed correctly.
· As a best practice, log in through Telnet or SSH. You cannot stop Tcl commands by using a shortcut key or a CLI command. If a problem occurs when the Tcl commands are being executed, you can terminate the process by closing the connection if you logged in through Telnet or SSH. If you logged in from the console or AUX port, you must perform one of the following tasks:
¡ Restart the device.
¡ Log in to the device by using a different method, and use the free line command to release the AUX line. For more information about the free line command, see "Login management commands."
· You can press Ctrl+D to abort Tcl command read stdin.
Procedure
1. Enter Tcl configuration view from user view.
tclsh
2. Execute a Tcl command.
Tcl command
3. Return from Tcl configuration view to user view.
¡ tclquit
¡ quit
Executing Comware commands in Tcl configuration view
About executing Comware commands in Tcl configuration view
To execute a Comware command in Tcl configuration view, use one of the following methods:
· Enter the Comware command directly. If a Tcl command uses the same command string as the Comware command, the Tcl command is executed.
· Prefix the Comware command with the cli keyword. If a Tcl command uses the same command string as the Comware command, the Comware command is executed.
Restrictions and guidelines
Follow these restrictions and guidelines when you execute Comware commands in Tcl configuration view:
· To specify a string enclosed in quotation marks (") or braces ({ and }), you must use the escape character (\) before the quotation marks or braces. For example, to specify "a" as the description for an interface, you must enter description \"a\". If you enter description "a", the description is a.
· 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, use one of the following methods:
¡ Enter multiple Comware commands separated by semi-colons to execute the commands in the order they are entered. For example, line aux 0 ; authentication-mode none.
¡ Specify multiple Comware commands for the cli command, quote them, and separate them by a space and a semicolon. For example, cli "line aux 0 ; authentication-mode none".
¡ Specify one Comware command for each cli command and separate them by a space and a semicolon. For example, cli line aux 0 ; cli authentication-mode none.
Procedure
1. Enter Tcl configuration view
tclsh
2. Execute Comware commands.
¡ Execute Comware commands directly.
Command
¡ Execute Comware commands by using the cli command.
cli command
3. Return from Tcl configuration view to user view.
¡ tclquit
¡ quit