repeat [cmdlist] [count] [delay]


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.



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.


Specifies number of times to execute the command or commands.


Specifies a delay. The execution of the command is delayed for the number of seconds specified.


switch(config)# repeat 1-4,7-8,10 count 2 delay 3


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
   --------------  ----------------  --------  ----    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  No No