01-Fundamentals Command Reference

HomeSupportSwitchesS6300 SeriesReference GuidesCommand ReferencesH3C S6300 Switch Series Command References-Release 243x-6W10001-Fundamentals Command Reference
11-Tcl commands
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

  • 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
新华三官网