SYNTAX

    repeat [options] <count> <command>


OPTIONS

-h (--help) bool

Display help.

-k (--keep-going) bool

If an iteration returns an error, proceed with the next iteration. Ordinarily execution will abort if an error is returned.

-w (--wait) int

If specified, wait this number of milliseconds between iterations.


ARGUMENTS

<count>

The number of repetitions to perform. If set to zero, will repeat indefinitely. [uint]

<command>

The command to run. Any further arguments or options will be coalesced into this one. [string]


DESCRIPTION

Execute a command-line multiple times.

On each iteration, the environment variable REPEAT_COUNT is set to an integer value representing the iteration number currently being processed. This can be used, for example, to produce unique file names.

Note that unlike source, foreach and while, changes to environment variables within command do not update the parent environment. This is mostly for legacy reasons.

For a more expressive looping primitive, see the while command.


SEE ALSO

while


COPYRIGHT

Copyright (c) 2006-2011 Accenture. All rights reserved.