________________________________
From: Michael Stowe <
mstowe@...>
To:
heyu_users@yahoogroups.com
Sent: Wednesday, July 8, 2009 4:49:31 PM
Subject: Re: [heyu_users] Sharing a script
Just out of curiosity, why didn't you use "wall"?
> I tend to develop heyu scripts and monitor activity remotely using ssh.
> In addition to echoing messages in a file, I like to see certain heyu
> activity on the terminal when an event happens. Below is a script that,
> as a result of A1 transitioning from OFF to ON, will send the appropriate
> message and date & time to all of the ssh terminal sessions I have open. I
> am sharing it, thinking it would be useful for others to use, as well as
> how to use some of the bash scripting language. This script is pretty
> basic and I've made a lot of variations, but the basic idea is still the
> same....monitor for a sensor operation and inform the user in an ssh
> session(s). One can also slightly modify the script to deal with std term
> sessions (ttySx) instead of virtual ssh terminals...
> John
>
>
> SCRIPT -l testscript3 A1 on rcvi sndc :: heyu fon C1; echo "Alarm
> Triggered">my_ file; for PTS in $(w|grep -o pts/.) ; do
> date>>/dev/$ PTS;echo "Motion sensor triggered">> /dev/$PTS;done
[Non-text portions of this message have been removed]