repositorypackage
0.0.1-beta.1
Repository: https://github.com/lafolle/gtc.git
Documentation: pkg.go.dev
# README
###Go Timed Command
gtc
runs the command for at most given duration.
If no duration is provided, gtc
runs the command unitl it exits by itself.
###Install
go get github.com/lafolle/gtc
###Usage
Usage of gtc:
-p=false: perserve status of cmd
-t=2522880h: duration of cmd
command
###Todo
- Tests
- Improvise on the design of communication betweeen main and gocoroutine
- Relay signals to
gtc
to the command being executed
###Test checks
- gtc -t=12s ls -R / should run the command for 12 secs
- gtc ls -R / should run the command until it exits by itself
- gtc ls -R / > /tmp/k should write to /tmp/k from stdout of cmd
- echo / | gtc -t=3s ls -R
this works bit differently.
echo / | xargs gtc -t=3s ls -R
This needs to be investigated as currently gtc does not its stdin tocmd
's stdin
###References: