Package cct is a cli program to run concurrent command lines
Check the release page!
go get github.com/mh-cbon/cct
wget -O - https://raw.githubusercontent.com/mh-cbon/latest/master/source.sh \
| GH=mh-cbon/cct sh -xe
# or
curl -L https://raw.githubusercontent.com/mh-cbon/latest/master/source.sh \
| GH=mh-cbon/cct sh -xe
curl -L https://raw.githubusercontent.com/mh-cbon/latest/master/install.sh \
| GH=mh-cbon/cct sh -xe
# or
wget -q -O - --no-check-certificate \
https://raw.githubusercontent.com/mh-cbon/latest/master/install.sh \
| GH=mh-cbon/cct sh -xe
cct is a cli program to run concurrent command lines
Show version
Show this help
Add $cmd to given $bucket
Wait for <bucket> commands completion, prints command results.
When a command of the bucket is finished and queried, it is removed.
-immediate: prevent the program to wait for bucket completion before returning.
-keep: prevent the program to remove finished commands of the bucket being queried.
Start the backend to execute commands concurrently.
The backend automatically exits after duration <n> when
- tasks list is empty
- tasks are finished
The backend watches for all http activities and delay the timeout.
-timeout n: duration length before the backend exits automatically.
cct -add -timeout 2 1 sleep 2
cct -a 1 sleep 10
cct -a 1 sleep 5
Note: using a one liner syntax would result in a totally different result!
cct -a 1 sleep 10;cct -a 1 sleep 10
cct -wait 1
This command will wait for the completion of all three commands added to the bucket 1
cct -w 1
Running the command again will return immediately, the response is an empty list as the bucket 1 was flushed by the previous call.
cct -w -k -i -j 1
Use [-keep|-k] and [-immediate|-i] options to only query the status of every commands in the bucket 1.
Those options prevent the bucket to be emptied.
Use [-json|-j] option to return a JSON obect of []Task.
gump patch -d # check
gump patch # bump