229
Using 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:
•
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. 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.
•
Make sure the Tcl commands can be executed correctly. 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 port, you must restart the
device. As a best practice, log in through Telnet or SSH.
To use Tcl to configure the device:
Task
Command
Remarks
Enter Tcl configuration view from
user view.
tclsh
N/A
Execute a Tcl command.
Tcl command
You can use a Comware
command to enter a subview
under Tcl configuration view to
configure the device.
Return from a subview under Tcl
configuration view to the
upper-level view.
quit
N/A
Return from a subview under Tcl
configuration view to Tcl
configuration view.
Press
Ctrl+Z
.
N/A
Return from Tcl configuration view
to user view.
•
tclquit
•
quit
The
tclquit
command is available
only in Tcl configuration view.
NOTE:
•
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.
Содержание FlexNetwork 10500 Series
Страница 139: ...130 Sysname display version ...