repeat
Syntax
repeat [id <POSITION>] [<COUNT>] [<DELAY>]
Description
Repeatedly executes one or more commands. By default, the most recent command in the history is executed until you press Ctrl+C.
Command context
Manager (#
)
Parameters
<POSITION>
Specifies the position of a command, or range of positions of multiple commands, in the history list as shown in the output of the
show history
command.<POSITION>
can be a single number, a comma-separated list of numbers, or a range of numbers specified by the beginning and end of the range, separated by a hyphen.If the
id
parameter is not specified, therepeat
command executes the command that was entered most recently. Default: 1.<COUNT>
Specifies number of times to execute the command or commands. Default: The command repeats an infinite number of times.
<DELAY>
Specifies the number of seconds to delay before executing the command. Default: 2
Authority
Administrators or local user group members with execution rights for this command.
Example
switch# repeat 1-4,7-8,10 count 2 delay 3