On Thu, 11 Jul 1996, Alan Stebbens <stebbens(_at_)sgi(_dot_)com> wrote:
This is what I have come up with so far. There must be an easier way:
FROM=`formail -rtzxTo:`
SUBJ=`formail -rtzxSubject:`
TTY=/dev/`who | grep lolson | awk '{print $2}'`
:0c
| echo "You have new mail from $FROM about $SUBJ" > $TTY
What do you think will happen if you are logged more than once, say with
multiple xterm's?
I thought of that too. It generates an ambiguous redirect and neither
gets it. So finally I wrote a little script to send to all my ttys
that are not running any programs. So I ended up with:
FROM=`formail -rtzxTo:`
SUBJ=`formail -rtzxSubject:`
:0Ec
| mytty $USER "^You have new mail from $FROM about $SUBJ"
I spose I could incorporate the formail commands in there too, but I
decided to just leave it as a handy redirection utility.
Thanx for all your help.
Until NeXTime,
_ _ __ __
\_|_) _ o | | / () ,_ o |) /\_\/|\ , _ \\\' _///
| |/ | |/ >- / | | |/) | ||/ / \_/ \_/|/| \\\// _/ //
(\__/|_/|/|_/ \___/ |/|/| \/ \__/ |_/ \/ \_/ | |_/ \_-//'_/ //<'
|\ Computer Science Major(_at_)Jamestown College \/// <//'
________ |/_______ ____ ____ _ _________ __ / >> \\\'
/_ __/ / / / ____/ / __ \ / __ \ | / / ____/ | / / of /,)-^>> _/
/ / / /_/ / __/ / /_/ // /_/ / | / / __/ / |/ / The (/ \\ //
/ / / __ / /___ / __, // __ /| |/ / /___/ /| / Black //
/_/ /_/ /_/_____/ /_/ |_/_/ /_/ |___/_____/_/ |_/ Tower ((
THE RAVEN'S LOFT URL: http://acc.jc.edu/~lolson/ .signature V5.0