repeat [id <POSITION>] [<COUNT>] [<DELAY>]


The repeat command repeatedly re-executes one or more commands. By default, the most recent command in the history is executed until you press Ctrl+C.

Command context

Manager (#)



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, the repeat command executes the command that was entered most recently.

Default: 1


Specifies number of times to execute the command or commands.

Default: The command repeats an infinite number of times.


Specifies the number of seconds to delay before executing the command.

Default: 2




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