General TC > Programming & Scripting - Unofficial

Fell in love with the WATCH command

(1/1)

PDP-8:
Never used the WATCH command before and I dig it.

Was playing around with watching my cpu frequencies and came across a snippet in the Arch wiki docs, and I rewrote it a bit differently:


--- Code: ---watch 'cat /proc/cpuinfo | grep MHz'
--- End code ---

Single quotes, not back-ticks!  CTRL-C to stop it.

Pretty cool, although it doesn't beat Conky, but still awesome.  First time using it.

Of course you can do much more than just look at cpu freqs.  Grep your dmesg, other shell scripts, whatever.  Kind of a poor-man's notifier / debugger.  And, since we're running in ram with TC, there's no hit on any physical filesystem - nice.




Navigation

[0] Message Index

Go to full version