u2ug wrote:
REPOSTED FOR NONMEMBER: jig <[EMAIL PROTECTED]>
Just a silly question on sending messages from one line / process to another
in UV.
Is there anything else apart from the !MESSAGE utility (which doesnt' want
to work as specified) that will send a message to stdout of another process
/ line? Or can one point me in the right direction to create one?
You can do this with a shell script. I use the following on on linux:
SendMessage() {
#
# Send a message to all the current sessions for $USER.
#
for TTY in `w $USER |
egrep $USER |
awk '{print $2}'`
do
((echo -e "${MSG}\a") > /dev/${TTY}) >/dev/null 2>&1
done
}
You might have to tweak the syntax slightly for AIX. The places where I
use this are in shell scripts run as root by cron. If you try to run
this as a normal user, you're probably going to run into permission
problems since tty devices typically aren't group or world writeable.
You could get around this by putting the above in a shell script file
owned by root and executing "chmod u+s" on it to make it always run as root.
-John
--
John Hester
System & Network Administrator
Momentum Group Inc.
(949) 833-8886 x623
http://memosamples.com
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/