3 ms·
Show HN: Repeater – A tool which repeats CLI commands
- gregjor 3y agoWhat advantage does this have over bash loop (or zsh repeat), maybe combined with GNU parallel?
- baalimago 3y agoHello, I'm the author. The parallelism provides potentially huge speed increases over a normal bash loop (not to mention ease of use, no script file or complex oneliner required). If you clone the repo you can try `./benchmark`, and/or `./benchmark <am repetitions> <any command of your choice>` to run a benchmark on the cmd, check out the script `benchmark` script for more details. I don't know much about GNU parallel, I'll investigate it and see if I can add it to the benchmark script so it's possible to compare.
- gregjor 3y agoI'm not that interested in benchmarking what will likely show negligible performance differences for the things I might use this for. I try to avoid installing anything out of the mainstream on production servers, and keep dev servers as close to production as possible. That means any new tool or application has to more than pay its way with new or much improved functionality over out-of-the-box tools like bash/zsh, built-in job control (backgrounding), xargs, and GNU parallel. Not everyone has the same concerns but I've found my development and deployment experience stays simple and predictable if I keep third-party dependencies to the bare minimum.
- prosaole 3y agoIf speed is the most important factor, a more interesting comparison would be to parallel-bash: https://www.gnu.org/software/parallel/parallel_alternatives.html#differences-between-parallel-bash-and-gnu-parallel https://www.gnu.org/software/parallel/parallel_alternatives....
- withinboredom 3y agoI usually just use `watch` to run a command repeatedly every couple of seconds.
- Alifatisk 3y agoYeah, for me I find inline ruby to be enough for smaller repeated tasks. $ ruby -e '10.times { puts 1; sleep 1 }'
- dangcancelled 3y ago[flagged]