メイン コンテンツに進む
  • すばやく簡単にご注文が可能
  • 注文内容の表示、配送状況をトラック
  • 会員限定の特典や割引のご利用
  • 製品リストの作成とアクセスが可能
  • 「Company Administration(会社情報の管理)」では、お使いのDell EMCのサイトや製品、製品レベルでのコンタクト先に関する情報を管理できます。

Dell EMC SmartFabric OS10 User Guide Release 10.5.0

PDF

Multi-line alias

You can create a multi-line alias where you save a series of multiple commands in an alias. Multi-line alias is supported only in the Configuration mode.

You cannot use the exiting CLI keywords as alias names. The alias name is case-sensitive and can have a maximum of 20 characters.

  • Create a multi-line alias in CONFIGURATION mode. The switch enters the ALIAS mode.
    alias alias-name
  • Enter the commands to execute prefixed by the line n command in ALIAS mode. Enter the commands in double quotation marks and use $n to enter input parameters. You can substitute $n with either numbers ranging from 1 to 9 or with an asterisk (*) and enter the parameters while executing the commands using the alias. When you are using asterisk (*), you can use all the input parameters. The maximum number of input parameters is 9.
    line nn command
  • (Optional) You can enter the default values to use for the parameters defined as $n in ALIAS mode.
    default n input-value
  • (Optional) Enter a description for the multi-line alias in ALIAS mode.
    description string
  • Use the no form of the command to delete an alias in CONFIGURATION mode.
    no alias alias-name

You can modify an existing multi-line alias by entering the corresponding ALIAS mode.

Create a multi-line alias
OS10(config)# alias mTest
OS10(config-alias-mTest)# line 1 "interface $1 $2"
OS10(config-alias-mTest)# line 2 "no shutdown"
OS10(config-alias-mTest)# line 3 "show configuration"
OS10(config-alias-mTest)# default 1 "ethernet"
OS10(config-alias-mTest)# default 2 "1/1/1"
OS10(config-alias-mTest)# description InterfaceDetails
View alias output for mTest with default values
OS10(config)# mTest
OS10(config)# interface ethernet 1/1/1
OS10(conf-if-eth1/1/1)# no shutdown
OS10(conf-if-eth1/1/1)# show configuration
!
interface ethernet1/1/1
 no shutdown
 switchport access vlan 1
View alias output for mTest with different values
OS10(config)# mTest ethernet 1/1/10
OS10(config)# interface ethernet 1/1/10
OS10(conf-if-eth1/1/10)# no shutdown
OS10(conf-if-eth1/1/10)# show configuration
!
interface ethernet1/1/10
 no shutdown
 switchport access vlan 1
Modify an existing multi-line alias
OS10(config)# alias mTest
OS10(config-alias-mTest)# line 4 "exit"
View the commands saved in the multi-line alias
OS10(config-alias-mTest)# show configuration
!
alias mTest
 description InterfaceDetails
 default 1 ethernet
 default 2 1/1/1
 line 1 "interface $1 $2"
 line 2 "no shutdown"
 line 3 "show configuration"
 line 4 exit
View alias information
OS10# show alias
Name                 Type
----                 ----
mTest                Config

Number of config aliases : 1
Number of local aliases : 0
View alias information brief. Displays the first 10 characters of each line of each alias.
OS10# show alias brief
Name                 Type        Value
----                 ----        -----
mTest                Config      line 1 "interface ..."
                                 line 2 "no shutdow..."
                                 line 3 "show confi..."
                                 default 1 "ethernet"
                                 default 2 "1/1/1"

Number of config aliases : 1
Number of local aliases : 0
View alias detail. Displays the entire alias value.
OS10# show alias detail
Name                 Type        Value
----                 ----        -----
mTest                Config      line 1 "interface $1 $2"
                                 line 2 "no shutdown"
                                 line 3 "show configuration"
                                 default 1 "ethernet"
                                 default 2 "1/1/1"

Number of config aliases : 1
Number of local aliases : 0
Delete an alias
OS10(config)# no alias mTest

このコンテンツを評価する

正確
有益
分かりやすい
この記事は役に立ちましたか?
0/3000 characters
  1~5個の星の数で評価してください。
  1~5個の星の数で評価してください。
  1~5個の星の数で評価してください。
  この記事は役に立ちましたか?
  コメントでは、以下の特殊文字は利用できません: <>()\