repeat

Syntax

repeat [id <POSITION>] [<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 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, the repeat 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

Example

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