I want a better way to do this, mostly for command line use:
while sleep 60; do mysql -e 'show processlist'; done
This is better than:
while mysql -e 'show processlist'; do sleep 60; done
... because if I type a
ctrl-c, it stops. However, the first version waits for a minute before first output.
I know about
watch. Often good, but not for all circumstances. I'm looking for a simple output to stdout, not curses. It'd be nice if
watch had a
Simplicity is key here. I don't care about handling errors in the mysql statement. It can report its own errors to stdout.