Users Guide

Table Of Contents
Advanced CLI tasks
Command alias Provides information to create shortcuts for commonly used commands, see Command alias.
Batch mode Provides information to run a batch le to execute multiple commands, see Batch mode.
Linux shell
commands
Provides information to run commands from the Linux shell, see Linux shell commands.
OS9 commands Provides information to enter conguration commands using an OS9 command syntax, see Using OS9 commands.
Command alias
To create shortcuts for commonly used or long commands, use the alias command. A command alias executes long commands with
parameters.
To create a command alias that is persistent and available in other OS10 sessions, create the alias in CONFIGURATION mode.
To create a command alias that is non-persistent and is used only in the current OS10 session, create the alias in EXEC mode. After you
close the session, the alias is removed from the switch.
Create a command alias in EXEC or CONFIGURATION mode.
alias alias-name alias-value
The alias-name is case-sensitive and has a maximum of 20 characters. It does not support existing keywords, parameters, and
short form of keywords.
The alias-value is the CLI command executed by the alias name. To enter command parameters, enter $n, where n is a
number from 1 to 9 or an asterisk (*). Enter $* to enter up to nine parameters with the alias name.
You cannot create a shortcut for the alias command.
To delete an alias, use the no alias alias-name command.
To view the currently congured aliases, use the show alias [brief | detail] command.
Create an alias
OS10# alias showint "show interface $*"
OS10(config)# alias goint "interface ethernet $1"
View alias output for showint
OS10# showint status
---------------------------------------------------------------------------------
Port Description Status Speed Duplex Mode Vlan Tagged-Vlans
---------------------------------------------------------------------------------
Eth 1/1/1 up 40G A 1 -
Eth 1/1/2 up 40G A 1 -
Eth 1/1/3 up 40G A 1 -
Eth 1/1/4 up 40G A 1 -
Eth 1/1/5 up 40G A 1 -
Eth 1/1/6 up 40G A 1 -
Eth 1/1/7 up 40G A 1 -
Eth 1/1/8 up 40G A 1 -
Eth 1/1/9 up 40G A 1 -
Eth 1/1/10 up 40G A 1 -
...
4
Advanced CLI tasks 89