LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   using Linux write command and ringing system bell (http://www.linuxquestions.org/questions/programming-9/using-linux-write-command-and-ringing-system-bell-804400/)

i_have_a_question 04-26-2010 10:07 PM

using Linux write command and ringing system bell
 
I have made this bash script program that i run while logged into an ssh server, (while in the linux command terminal). The username "jking" would be another person logged into the same ssh server. I normally use this to send messages to other user's command terminal, but they don't always know they have gotten the message. Is there any way I could ring their computer's bell when the message is sent? would i need, for example, jking's computer's address such as 10.43.132.254 ??

your help is GREATLY appreciated! THANKS!!

========================================================

#!/usr/bin/sh
#3/23/10
#john doe

clear

write jking << EOF
>"this is sent message"
EOF

done
==========================================================

hda7 04-27-2010 09:15 AM

To ring the terminal bell (which may not work on newer computers) you should write the ascii "BEL" character (07, 0x7, 7) to their terminal. If you are informing local users, you may want to make a script that finds and directly writes to their terminal. Otherwise, I don't know if "write" will send binary data.


All times are GMT -5. The time now is 01:56 AM.