Andrew's Digital Garden

Looping commands in shell

Useful for things like burn tests.

In bash, this can be done with:

for i in {1..10}; do commandNameHere; done

zsh has the repeat command:

repeat 5 { echo "Command1"; echo "Command2" }

[[shell]]

Looping commands in shell