News for hackers. Stuff that matters.

Show HN: Loop, run a command in loop and nothing else

https://github.com/jcamiel/loop-bin

This is a small utility to loop a command, in a shell. This is deceptively simple, you can loop a command forever, or loop until it is succeeded or failed.

Currently, it really does nothing else than a bash `for` and `sleep`, but I intend to add the possibility of running a command in loop, in parallel.

In conjonction with some tests/stress tools (like https://hurl.dev who I am one of the maintainer), I think this can be useful to other...

  $ loop --iter 4 --delay 1000 date
  Tue Aug  9 06:59:58 CEST 2022
  Tue Aug  9 06:59:59 CEST 2022
  Tue Aug  9 07:00:00 CEST 2022
  Tue Aug  9 07:00:01 CEST 2022
( 2 comments | 2 points | on HN )
Re:Show HN: Loop, run a command in loop and nothing else by st0le on Tuesday August 09, 2022 @11:57AM (#32399654)
Someone had the same idea and name :)

https://github.com/Miserlou/Loop

Re:Show HN: Loop, run a command in loop and nothing else by jicea on Tuesday August 09, 2022 @12:01PM (#32399718)
I guess I didn’t do my homework searching for it. I’m ashame I’ve polluted crates.io with a soon to be deprecated project…