Rewriting of the original watch
linux command in order to add some new feature to it:
- Better view.
- Execute 2, 3 or 4 commands simultaneously.
I'm working on Kubernetes every single day. And my team and I are using a lot the watch
tool to monitor if our last change was well applied by Flux for example.
I usually need to open 2, 3 in my term/tmux to be able to monitor everything. With this tool, we will be able to monitor 2 or 3 things at once.
# basic execution
gwatch "command"
# interval selection (in seconds)
gwatch "command" -i 5
# multiple commands
gwatch "command1" "command2" "command3" "command4"
or
gwatch -c "command1" -c "command2" -c ...
Clone the repository then:
$ make build
- Multicommand support.
- Change interval support.
- Exec commands asynchronously.
- Highlight differences with -d or --differences flag
- Choose the layout when there is 2 or 3 commandes ?
- Handle command with a pipe -> "kubectl get pods | grep test"