repeat
Syntax
repeat [cmdlist] [count] [delay]
Description
The repeat
command repeatedly
re-executes one or more commands. By default, the most recent command
in the history is executed until a key is pressed.
Options
[cmdlist]
Specifies the position of a command, or range of positions of multiple commands, in the history list. The nth most recent commands in the history, where "n" is the position in the history list, are re-executed.
[count]
Specifies number of times to execute the command or commands.
[delay]
Specifies a delay. The execution of the command is delayed for the number of seconds specified.
Usage
switch(config)# repeat 1-4,7-8,10 count 2 delay 3
Example
This demonstrates the use of the repeat
command to re-execute commands that are at positions 1 through 2
in the command history.
switch(config)# show history
3 show ver
2 show ip
1 show arp
switch(config)# repeat 1-2
IP ARP table
IP Address MAC Address Type Port
-------------- ---------------- -------- ----
15.255.128.1 000000-000000 dynamic
Internet (IP) Service
IP Routing : Disabled
Default Gateway :
Default TTL : 64
Arp Age : 20
Domain Suffix :
DNS server :
VLAN | IP Config IP Address Subnet Mask Proxy ARP
------------------ + ----------- --------------- -------------- ---------
DEFAULT_VLAN | DHCP/Bootp 15.255.131.90 255.255.248.0 No No