Basic Operation Guide 2014/02

CLI control and editing
Executing a prior command—redo
The redo command executes a prior command in the history list.
Syntax:
redo [ number | command-str ]
Re-executes a command from history. Executes the last command by default.
number: The position of the command to execute in the history list. When number
is specified, the nth command starting from the most recent command in the history
is executed.
command-str: When command-str is specified, the most recent command whose
name matches the specified string is executed.
Example 20 The redo command
HP Switch(config)# show history
2 show arp
1 show flash
HP Switch(config)# redo 2
IP ARP table
IP Address MAC Address Type Port
------------- -------------- -------- ----
15.255.128.1 00000c-07ac00 dynamic A11
Repeating execution of a command
The repeat command executes a previous command in the history list.
Syntax:
repeat [cmdlist] [count] [delay]
Repeats execution of a previous command. Repeats the last command by default
until a key is pressed.
If a number or range of numbers is specified, the command repeats the nth most recent
commands (where "n" is the position in the history list).
cmdlist
Repeats the command for the number of times specified.count
The command repeats execution after a delay for the number of seconds specified.delay
For example:
HP Switch(config)# repeat 1-4,7-8,10 count 2 delay 3
CLI control and editing 37