example,
cct -add 1 ls -al cct -add 1 sleep 10 cct -add 1 sleep 5
cct -wait -json -keep -immediate 1
cct -wait 1
It certainly was a pretext to play with channels :p
It works by attaching cmds to a bucket,
then this bucket is studied to know when its time to exit.
The program spawns an http server in the backend, that one runs in background, it is able to auto exit,
it is responsible to execute the commands.
The add commands just do a POST http request on the backend for queuing, it returns immediately.
The wait command queries the task to the http backend, then returns it.
When you don t use -immediate, it block until all cmds finished.
When you combine -immediate -keep -json you can have a report status
of the various processes being run in the bucket.
If you don t provide -json, it just shows tasks output.
its here https://github.com/mh-cbon/cct!