repeat~ repeat a command n times |
| git clone https://github.com/djnnvx/repeat.git |
| log | files | refs | archive | README |
repeat
This is an uber-simple command-line tool to repeat a function n times.
It very much sucks in its current version, don't actually use this for serious work.
The path, shell, ENV handling is almost non-existent. There is no way to specify if you want your commands to continue even if one fails.
You also can't use bash-specific built-ins like echo.
All it does is execute one function n times. if it fails, it stops. i just needed this for a random script, but why not share it for those who need it.
Compile
$ make
# if you dare
$ make install
requires
clangto be installed, but you can compile it with pretty much anything. it is a very simple program.
Usage
$ repeat 5 printf "hello\n"