Ie: if you want the output to go /dev/console, then do this:
:0c
| echo "You have new mail from $FROM bout $SUBJ" >/dev/console
This is what I figured, but as I am on a tty which changes
every time I log on, I need a way for it to find the right one.
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?