User guide

Command Help Using the CLI
page 5-6 OmniSwitch AOS Release 7 Switch Management Guide March 2015
The !! (bang, bang) command will display the last command line entered and automatically run the
command.
Inserting Characters
To insert a character between characters already typed, use the Left and Right Arrow keys to place the
cursor into position, then type the new character. Once the command is correct, execute it by pressing
Enter. In the following example, the user enters the wrong syntax to execute the command. The result is an
error message.
-> show mirocode
ERROR: Invalid entry: "mirocode"
To correct the syntax without retyping the entire command line, use the up arrow to recall the previous
syntax. Then, use the Left Arrow key to edit the command as needed.
-> show microcode
To execute the corrected command, press Enter.
Command History
The history command allows you to view commands you have recently issued to the switch. The switch
has a history buffer that stores the most recently executed commands.
Note. The command history feature differs from the command logging feature in that command logging
stores the most recent commands in a separate command.log file. Also, the command logging feature
includes additional information, such as full command syntax, login user name, entry date and time,
session IP address, and entry results. For more information on command logging, refer to “Logging CLI
Commands and Entry Results” on page 5-7.
You can display the commands in a numbered list by using the history command. The following is a
sample list:
-> history
1 show cmm
2 show fantray
3 show vlan
4 show temperature
5 ip load dvmrp
6 show arp
7 clear arp
8 show ip config
9 ip helper max hops 5
10 show ip interface
11 show vlan
12 history
You can recall commands shown in the history list by using the exclamation point character (!) also called
“bang”. To recall the command shown in the history list at number 4, enter !4 (bang, 4). The CLI will
respond by printing the number four command at the prompt. Using the history list of commands above,
the following would display:
-> !4
-> show ip interface