01-Fundamentals Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S6520X-HI[EI][SI] & S6520-SI & S5560X-HI & S5000-EI & MS4600 Switch Series Command References-R63xx-6W10101-Fundamentals Command Reference
10-Tcl commands
Title Size Download
10-Tcl commands 43.41 KB

Tcl commands

cli

Use cli to enable a Comware command to be executed in Tcl configuration view when it conflicts with a Tcl command.

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, if a Comware command conflicts with a Tcl command, the Tcl command will be executed. To execute the Comware command when a conflict occurs, execute the cli command.

Examples

# Perform the following steps to execute a Comware command that conflicts with a Tcl command in Tcl configuration view.

1.     Execute a Comware command in Tcl configuration view. The output shows that the Comware command cannot be executed because it conflicts with a Tcl command.

<Sysname> tclsh

<Sysname-tcl> system-view

[Sysname-tcl] route-policy 1 permit node 10

[Sysname-tcl-route-policy-1-10] apply cost 10

can't interpret "cost" as a lambda expression

2.     Configure the cli command to execute the Comware command again.

[Sysname-tcl-route-policy-1-10] cli apply cost 10

# Execute multiple Comware commands in one operation.

<Sysname> tclsh

<Sysname-tcl> system-view

·     Method 1:

[Sysname-tcl] cli "vlan 2 ; description Tech"

·     Method 2:

[Sysname-tcl] cli vlan 2 ; cli description Tech

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 after you execute Comware commands to enter 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

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网